6
votes

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?

1
So if you hit win+r and then type aws and hit enter, it runs the awscli fine? That aside, I strongly recommend that you consider using SSH access for CodeCommit rather than HTTPS and awscli. - jarmod
Assuming you've got aws on your path, you can run into problems if your path is too long where it gets truncated. Try moving the relevant bit to the front of your $PATH variable - rbennett485
@jarmod - yep, that works. I will have a look at ssh but I think port 22 is locked down by our company proxy. - Russell Keane
@rbennett485 - I thought something similar and tried that already but no dice. - Russell Keane
You tried updating your config to helper = /full/path/to/aws ...? - rbennett485

1 Answers

8
votes

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