Easy CodeCommit authentication with git-remote-codecommit

There is a new and much easier way to interact with CodeCommit repositories from git. Forget the times when you need to run git config for setting helper scripts for authentication and enter the XXI century with git-remote-codecommit.

In a nutshell, this new git helper gives you two features:

  • Authenticate using your aws cli credentials automatically

  • Use a new codecommit:// protocol that simplifies the url and naming of the repositories.


How to install it

Install the helper with pip:


pip install --user git-remote-codecommit


How to use it

Once you have installed the codecommit helper, you may clone any repository using the following syntax:


git clone codecommit://$PROFILE@$REPOSITORY


Where:

  • $PROFILE is the name of the profile for the repository in your aws config.

  • $REPOSITORY is the repository name in CodeCommit.

Conclusion

Using the new helper allows you to be up and running with new repositories in no time, and saves you the work of maintaining credentials and configuration files.








Carlos Barroso

Senior MLOps Engineer

teracloud.io








#Teracloud #TeraTips #aws #awslatam #DevOps #Codecommit #Github #code #security #awscli


Follow us on our social networks for more TeraTips