Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon CodeCommit credential helper - command not found

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?

like image 903
Russell Keane Avatar asked Oct 09 '18 18:10

Russell Keane


People also ask

How do I get my AWS CodeCommit credentials?

You can directly view and manage your CodeCommit credentials in My Security Credentials. For more information, see View and manage your credentials. On the user details page, choose the Security Credentials tab, and in HTTPS Git credentials for AWS CodeCommit, choose Generate.

Where do you set up Git credentials of AWS CodeCommit?

On the IAM user page, Dave selects the Security Credentials tab and clicks Generate under HTTPS Git credentials for AWS CodeCommit section. This creates and displays the user name and password. Dave can then download the credentials. Note: This is the only time the password is available to view or download.

What is AWS CodeCommit credential helper?

It enables Git to use HTTPS and a cryptographically signed version of your IAM user credentials or Amazon EC2 instance role whenever Git needs to authenticate with AWS to interact with CodeCommit repositories.


1 Answers

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
like image 59
David Jackson Avatar answered Oct 28 '22 05:10

David Jackson