I've set up an EC2 instance, given it an instance profile with an IAM role that permits it access to my codecommit repository, and now I'm trying to pull from it using git. Since I'm using temporary credentials from the iam role I don't have a credentials profile... but that should be ok.
I've tried:
git config --global credential.helper '!aws codecommit credential-helper $@'
But that doesn't work
If I put the following into a file, say 'repodesc'
protocol=https
path=/v1/repos/reponame
host=git-codecommit.us-east-1.amazonaws.com'
and then run
cat repodesc | aws codecommit credential-helper get
it sends me back a temporary username and password... so I know that's working...
So using that I tried:
git pull https://user:pass@git-codecommit.us-east-1.amazonaws.com/v1/repos/reponame
But that fails. Says the format's wrong.
I don't want to do this with ssh, because it defeats the whole point of temporary credentials. I want to do this the right way. But it's INFURIATING.
I've looked at the overly verbose amazon documentation a million times and can't seem to find my way to the page with the answer on.
Any help would be hugely appreciated. I'm literally pulling my hair out.