For detailed instructions see – http://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-ssh-windows.html
These are the main commands to give in Git console or Terminal.
- cd ~
- ssh-keygen
- cd .ssh
- notepad codecommit_rsa.pub
Copy the key and upload it to AWS IAM. Copy the SSH Key ID generated created and paste it in ~/.ssh/config file. The file content will be
Host git-codecommit.*.amazonaws.com
User APKAXXXXXX
IdentityFile ~/.ssh/id_rsa
Go back to terminal and give following commands
- ssh git-codecommit.us-east-2.amazonaws.com
If you see a success message, you can continue with cloning repository.
- git clone ssh://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo my-demo-repo