7

I have a CodeCommit repo that I'm trying to connect to from the command line of Windows 7.

My intention is to use the aws configure / aws credential helper method as I prefer this, in this context, to a username / password.

When attempting any git operations I get:

aws codecommit credential-helper $@ get: aws: command not found

I'm then able to then use a username and password but this invalidates the point of using aws configure to set up access keys.

The credentials section of my .gitconfig file looks like this:

[credential]
    helper = !aws codecommit credential-helper $@
    UseHttpPath = true

It looks like git can't access aws.cmd but the full path to it is on the system and user path environment settings.

Any ideas?

Russell Keane
  • 537
  • 1
  • 6
  • 12

1 Answers1

9

It seems like a recent update of the AWS CLI for windows possibly removed something.

Can you try this as a workaround?

[credential]
    helper = !'C:\\Program Files\\Amazon\\AWSCLI\\bin\\aws.cmd' codecommit credential-helper $@
    UseHttpPath = true
David Jackson
  • 591
  • 2
  • 5
  • Had to put this down for a while but this appears to have worked. Brilliant, thanks. – Russell Keane Dec 13 '18 at 18:30
  • Have spent many hours to search and this is the only one that works. Thanks you very much. – Steve Dec 13 '18 at 22:29
  • It's amazing that this isn't better documented officially. I've had to come back to this post many times to remember how to make this work. Anyway, for AWS CLI v2, you can use this path: `helper = !'C:\\Program Files\\Amazon\\AWSCLIV2\\aws.cmd' codecommit credential-helper $@` – trademark Jan 07 '21 at 19:17