Inception: Learn about AWS CodeCommit HTTPS connection types that will help you in connecting with `pull`, `push`, `branching`, etc git operation on CodeCommit from your local computer. This is another basic step towards setting up fully automated AWS Pipeline in DevOps.
To setup HTTPS connection with AWS CodeCommit, you need to create a repository and then an IAM User. Click here to Setup SSH connection with AWS CodeCommit repository.
Setup HTTPS connection pretty easy in AWS CodeCommit. Following are steps to setup it.
Create IAM Users/Groups
Follow below steps to create a IAM Group and User.
- Create a IAM Group named
- Attach a Managed Policy
- Create an IAM User with Programmatic access, and AWS Management Console access
- Add this new User to the
Generate HTTPS Git credentials for AWS CodeCommit
Following are the steps to generate HTTPS Git credentials for AWS CodeCommit.
- Login to AWS Console and go to IAM
- Click on IAM User, you want to generate HTTPS credentials.
- Click on Security credential tab
- Go to HTTPS Git credentials for AWS CodeCommit, and click on Generate credentials button.
- It will generate credentials and show you User name, and Password
- Download the credentials and keep it safe.
Setup your repository
Now you will learn how to use these HTTPS credentials to upload your local code to AWS CodeCommit.
There might be 2 scenarios, either you might have created a new CodeCommit repository, which has nothing as of now or you are going to join a developers team in which there is already a CodeCommit repository and you want to clone that repository.
Both scenarios are similar except in first one you are going to make first commit.
Follow below steps to setup connection to CodeCommit repository from scratch.
- You have created a empty CodeCommit repository, and HTTPS git credentials are generated.
- Go to CodeCommit repository, click on Clone URL, and then click on Clone HTTPS option to copy the URL
- Go to command line and type a command git clone HTTPS_GITHUB_URL and press enter.
- Enter the HTTPS credential’s Username and Password
- You must see Warning: You appear to have cloned an empty repository. and Checking connectivity… done. on successful connection.
- Now you have established HTTPS connection from your local machine to CodeCommit repository. You are ready to push some initial code to the repository.
In this scenario, you have already a repository in AWS CodeCommit and you want to clone the repo and start contributing the code.
Follow below steps to setup connection to CodeCommit repository.
- You have existing repository on AWS CodeCommit, and you have generated HTTPS Git credentials for AWS CodeCommit for your IAM user.
- Go to AWS CodeCommit repository on AWS Console.
- Click on repository, you want to clone it locally.
- Click on
Clone URL, and then click on
- Go to command line and type a command
git clone HTTPS_GITHUB_URLand press enter.
- Enter the HTTPS credential’s Username and Password.
- You will see that repository has been cloned and you are ready to make changes in code and push them back to repository.
Conclusion: You have set up HTTPS Connection from your local machine to AWS CodeCommit, and cloned the repository to your local machine. Now you are ready to develop the code, commit and push the changes into CodeCommit Repository. You can run all `git` from your local machine.