0
votes

I am trying to connect to my codecommit repo using saml federated authentication and followed following documentation from AWS.

https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-https-windows.html https://docs.aws.amazon.com/codecommit/latest/userguide/troubleshooting-ch.html

I ran following commands to setup git

git config --system credential.helper "!aws codecommit credential-helper --profile saml $@"
git config --system credential.UseHttpPath true

git config --global credential.helper "!aws codecommit credential-helper --profile saml $@"
git config --global credential.UseHttpPath true

However, everytime I try to clone the repo from codecommit, it gives followinf error.

Cloning into 'sss-xxx-repo'...

The config profile (saml) could not be found

The config profile (saml) could not be found
Username for 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/sss-xxx-repo':

I tried all options to troubleshoot but no luck so far. I had created the saml profile and was successfully able to browse the repos by running below command.

aws codecommit list-repositories --profile saml

Looking for some expert help.

1
do you have the aws profile created in your computerArun K
Are you running git clone as the same user running aws codecommit list-repositories --profile saml?jarmod

1 Answers

1
votes

I found the issue. My .gitconfig file was getting created on a shared drive (Y:/) and not on the same drive (C:\Users\ssingh) where I have .aws folder with credentials.

I had to copy the .aws folder to Y:/ at the same location where .gitconfig file is and it worked.