Almost every time I try and sync a repo from CodeCommit using SSH public keys I get an auth error, credential error or some form of “cannot” using different Git UI’s.
Create new HTTPS credentials in https://console.aws.amazon.com/iam/home?region=XXX#/security_credentials?credentials=codecommit
Keep this page open.
Copy the “HTTPS Clone URL” from the Repo page in CodeCommit
In GitKraken: File > Clone Repo > in Repository Management: “Where to clone to”, Choose a directory to clone to.
in Repository Management: “URL” paste the url and add the red below – username being the username you just created at HTTPS Git credentials for AWS CodeCommit
when prompted add the password from the HTTPS Git credentials for AWS CodeCommit. Dont forget to check remember password.
That should work.
Options that don’t work
Creating new SSH Keypairs and uploading to AWS. That doesn’t work for sure.
Issue 1: SSL
Already actively using other repos with my Public key set up appropriately I was able to clone the new repo by entering, when prompted, the username provided on the My security credentials > AWS CodeCommit credentials > SSH Keys page (I’m pretty sure the AWS instructions don’t mention that this is the username you need and not the IAM user username), however I Cannot push or pull manually, yet somehow GitKraken keeps up to date with commits made via the web interface.
Issue 2: Copy HTTPS url and paste into GitKraken without adding username
If other repos have been authenticated already this method GitKraken will try to authenticate and fail, with no prompt to enter new credentials. No repo added, no ability to chose which credentials, no prompt to enter them. lol.
Issue 3: Clone with GIT Bash and try to open repo locally
It’s possible to open the repo locally, but try to pull (which of course wouldn’t work because the credentials aren’t stored) an error message is shown, again no way to set which credentials to use.