Saturday, December 17, 2016

Using git bash on windows with AWS CodeCommit

I've started using AWS CodeCommit for some projects and so far I'm a fan. It's a very simple web interface on top of git, so it doesn't have any code review or issue tracking features, but if what you're looking for is a private git repository for very cheap, CodeCommit might be right for you.

The only configuration you need for CodeCommit is the name of the repository. Once you've created that, AWS will present you with the URL to clone your repo.




They also give you some instructions to tell git that it should use your AWS secret keys as the authentication profile, but I had some trouble getting their instructions to work with git bash.

If you're a windows user like myself you're probably used to converting instructions for Linux into the Windows world. In this case it wasn't too bad. Amazon also provided a blog post that gave some further information.

Instead of using the commands their provided, I found my gitconfig file in C:\Program Files\Git\mingw64\etc (default location) and added the block they described


And that was all it took! From there I could use git normally.

I chose to setup git over HTTP, but I imagine a similar process would work for the actual git protocol.