A few days ago I read about Amazon CodeCommit, a git repository hosting service running in Amazons cloud. Of course I had to try it, so I decided to import my GlacierUploader to a new repository - fitting project for a CodeCommit repository. :smile:
Here’s the series of steps I had to go through to get my code into CodeCommit:
- Set up my IAM user with appropriate policies
- Set up CodeCommit to accept my SSH key
Little caveat here: You have to put your SSH key ID into
~/.ssh/config- took me a little while to get this right, I was putting my IAM username there which will result in an error message like
A client error (UnrecognizedPublicKeyEncoding) occurred when calling the UploadSSHPublicKey operation: Invalid public key uploaded.
- Install the AWS command line interface
- Add a new Git remote to my local repository to push the current code:
git add remote amazon your-url-to-the-codecommit-repo
- Push my repo to CodeCommit:
git push amazon master
I’m not quite sure if I want to use Amazons service to host my Git repositories. Most of my repositories are public and on Github anyway, and my private repositories are hosted on my own server… but it’s good to have an alternative to Github, in case the company does wrong in the future - can’t see that coming, but you never know.