

# Setting up for AWS CodeCommit
<a name="setting-up"></a>

You can sign in to the AWS Management Console and [upload, add, or edit a file](files.md) to a repository directly from the AWS CodeCommit console. This is a quick way to make a change. However, if you want to work with multiple files, files across branches, and so on, consider setting up your local computer to work with repositories. The easiest way to set up CodeCommit is to configure HTTPS Git credentials for AWS CodeCommit. This HTTPS authentication method: 
+ Uses a static user name and password.
+ Works with all operating systems supported by CodeCommit.
+ Is also compatible with integrated development environments (IDEs) and other development tools that support Git credentials.

You can use other methods if you do not want to or cannot use Git credentials for operational reasons. For example, if you access CodeCommit repositories using federated access, temporary credentials, or a web identity provider, you cannot use Git credentials. We recommend that you set up your local computer using the `git-remote-codecommit` command. Review these options carefully, to decide which alternative method works best for you.
+ [Setting up using Git credentials](#setting-up-standard)
+ [Setting up using other methods](#setting-up-other)
+ [Compatibility for CodeCommit, Git, and other components](#setting-up-compat)

For information about using CodeCommit and Amazon Virtual Private Cloud, see [Using AWS CodeCommit with interface VPC endpoints](codecommit-and-interface-VPC.md) .

## View and manage your credentials
<a name="setting-up-view-credentials"></a>

You can view and manage your CodeCommit credentials from the AWS console through **My Security Credentials**.

**Note**  
This option is not available for users using federated access, temporary credentials, or a web identity provider.

1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/).

1. In the navigation bar on the upper right, choose your user name, and then choose **Security Credentials**. 

1. Choose the **AWS CodeCommit credentials** tab.

## Setting up using Git credentials
<a name="setting-up-standard"></a>

With HTTPS connections and Git credentials, you generate a static user name and password in IAM. You then use these credentials with Git and any third-party tool that supports Git user name and password authentication. This method is supported by most IDEs and development tools. It is the simplest and easiest connection method to use with CodeCommit. 
+ [For HTTPS users using Git credentials](setting-up-gc.md): Follow these instructions to set up connections between your local computer and CodeCommit repositories using Git credentials.
+ [For connections from development tools](setting-up-ide.md): Follow these guidelines to set up connections between your IDE or other development tools and CodeCommit repositories using Git credentials. IDEs that support Git credentials include (but are not limited to) Visual Studio, Xcode, and IntelliJ.

## Setting up using other methods
<a name="setting-up-other"></a>

You can use the SSH protocol instead of HTTPS to connect to your CodeCommit repository. With SSH connections, you create public and private key files on your local machine that Git and CodeCommit use for SSH authentication. You associate the public key with your IAM user. You store the private key on your local machine. Because SSH requires manual creation and management of public and private key files, you might find Git credentials simpler and easier to use with CodeCommit.

Unlike Git credentials, SSH connection setup varies, depending on the operating system on your local computer. 
+ [For SSH users not using the AWS CLI](setting-up-without-cli.md): Follow these abbreviated instructions if you already have a public-private key pair and are familiar with SSH connections on your local computer.
+ [For SSH connections on Linux, macOS, or Unix](setting-up-ssh-unixes.md): Follow these instructions for a step-by-step walkthrough of creating a public-private key pair and setting up connections on Linux, macOS, or Unix operating systems.
+ [For SSH connections on Windows](setting-up-ssh-windows.md): Follow these instructions for a step-by-step walkthrough of creating public-private key pair and setting up connections on Windows operating systems.

If you are connecting to CodeCommit and AWS using federated access, an identity provider, or temporary credentials, or if you do not want to configure IAM users or Git credentials for IAM users, you can set up connections to CodeCommit repositories in one of two ways: 
+ Install and use **git-remote-codecommit** (recommended).
+ Install and use the credential helper included in the AWS CLI.

 Both methods support accessing CodeCommit repositories without requiring an IAM user, which means that you can connect to repositories using federated access and temporary credentials. The git-remote-codecommit utility is the recommended approach. It extends Git and is compatible with a variety of Git versions and credential helpers. However, not all IDEs support the clone URL format used by `git-remote-codecommit`. You might have to manually clone repositories to your local computer before you can work with them in your IDE.
+ Follow the instructions in [Setup Steps for HTTPS Connections to AWS CodeCommit Repositories with git-remote-codecommit](setting-up-git-remote-codecommit.md) to install and set up **git-remote-codecommit** on Windows, Linux, macOS, or Unix.

The credential helper included in the AWS CLI allows Git to use HTTPS and a cryptographically signed version of your IAM user credentials or Amazon EC2 instance role whenever Git needs to authenticate with AWS to interact with CodeCommit repositories. Some operating systems and Git versions have their own credential helpers, which conflict with the credential helper included in the AWS CLI. They can cause connectivity issues for CodeCommit. 
+ [For HTTPS connections on Linux, macOS, or Unix with the AWS CLI credential helper](setting-up-https-unixes.md): Follow these instructions for a step-by-step walkthrough of installing and setting up the credential helper on Linux, macOS, or Unix systems.
+ [For HTTPS connections on Windows with the AWS CLI credential helper](setting-up-https-windows.md): Follow these instructions for a step-by-step walkthrough of installing and setting up the credential helper on Windows systems.

If you are connecting to a CodeCommit repository that is hosted in another Amazon Web Services account, you can configure access and set up connections using roles, policies, and the credential helper included in the AWS CLI.
+ [Configure cross-account access to an AWS CodeCommit repository using roles](cross-account.md): Follow these instructions for a step-by-step walkthrough of configuring cross-account access in one Amazon Web Services account to users in an IAM group in another Amazon Web Services account.

## Compatibility for CodeCommit, Git, and other components
<a name="setting-up-compat"></a>

When you work with CodeCommit, you use Git. You might use other programs, too. The following table provides the latest guidance for version compatibility. As a best practice, we recommend that you use the latest versions of Git and other software.


**Version compatibility information for AWS CodeCommit**  

| Component | Version | 
| --- | --- | 
| Git | CodeCommit supports Git versions 1.7.9 and later. Git version 2.28 supports configuring the branch name for initial commits. We recommend using a recent version of Git.  | 
| Curl | CodeCommit requires curl 7.33 and later. However, there is a known issue with HTTPS and curl update 7.41.0. For more information, see [Troubleshooting](troubleshooting.md). | 
| Python (git-remote-codecommit only) | git-remote-codecommit requires version 3 and later. | 
| Pip (git-remote-codecommit only) | git-remote-codecommit requires version 9.0.3 and later. | 
| AWS CLI (git-remote-codecommit only) | We recommend a recent version of AWS CLI version 2 for all CodeCommit users. git-remote-codecommit requires AWS CLI version 2 to support AWS SSO and connections that require temporary credentials, such as federated users.  | 

# Setup for HTTPS users using Git credentials
<a name="setting-up-gc"></a>

The simplest way to set up connections to AWS CodeCommit repositories is to configure Git credentials for CodeCommit in the IAM console, and then use those credentials for HTTPS connections. You can also use these same credentials with any third-party tool or integrated development environment (IDE) that supports HTTPS authentication using a static user name and password. For examples, see [For connections from development tools](setting-up-ide.md).

**Note**  
If you have previously configured your local computer to use the credential helper for CodeCommit, you must edit your .gitconfig file to remove the credential helper information from the file before you can use Git credentials. If your local computer is running macOS, you might need to clear cached credentials from Keychain Access.

## Step 1: Initial configuration for CodeCommit
<a name="setting-up-gc-account"></a>

Follow these steps to set up an Amazon Web Services account, create an IAM user, and configure access to CodeCommit. 

**To create and configure an IAM user for accessing CodeCommit**

1. Create an Amazon Web Services account by going to [http://aws.amazon.com](http://aws.amazon.com) and choosing **Sign Up**.

1. Create an IAM user, or use an existing one, in your Amazon Web Services account. Make sure you have an access key ID and a secret access key associated with that IAM user. For more information, see [Creating an IAM User in Your Amazon Web Services account](https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_SettingUpUser.html).
**Note**  
CodeCommit requires AWS Key Management Service. If you are using an existing IAM user, make sure there are no policies attached to the user that expressly deny the AWS KMS actions required by CodeCommit. For more information, see [AWS KMS and encryption](encryption.md).

1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/).

1. In the IAM console, in the navigation pane, choose **Users**, and then choose the IAM user you want to configure for CodeCommit access.

1. On the **Permissions** tab, choose **Add Permissions**. 

1. In **Grant permissions**, choose **Attach existing policies directly**.

1. From the list of policies, select **AWSCodeCommitPowerUser** or another managed policy for CodeCommit access. For more information, see [AWS managed policies for CodeCommit](security-iam-awsmanpol.md).

   After you have selected the policy you want to attach, choose **Next: Review** to review the list of policies to attach to the IAM user. If the list is correct, choose **Add permissions**.

    For more information about CodeCommit managed policies and sharing access to repositories with other groups and users, see [Share a repository](how-to-share-repository.md) and [Authentication and access control for AWS CodeCommit](auth-and-access-control.md).

If you want to use AWS CLI commands with CodeCommit, install the AWS CLI. We recommend that you create a profile for using the AWS CLI with CodeCommit. For more information, see [Command line reference](cmd-ref.md) and [Using named profiles](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html#cli-configure-files-using-profiles).

## Step 2: Install Git
<a name="setting-up-gc-install-git"></a>

To work with files, commits, and other information in CodeCommit repositories, you must install Git on your local machine. CodeCommit supports Git versions 1.7.9 and later. Git version 2.28 supports configuring the branch name for initial commits. We recommend using a recent version of Git.

To install Git, we recommend websites such as [Git Downloads](http://git-scm.com/downloads).

**Note**  
Git is an evolving, regularly updated platform. Occasionally, a feature change might affect the way it works with CodeCommit. If you encounter issues with a specific version of Git and CodeCommit, review the information in [Troubleshooting](troubleshooting.md).

## Step 3: Create Git credentials for HTTPS connections to CodeCommit
<a name="setting-up-gc-iam"></a>

After you have installed Git, create Git credentials for your IAM user in IAM.

**To set up HTTPS Git credentials for CodeCommit**

1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/).

   Make sure to sign in as the IAM user who will create and use the Git credentials for connections to CodeCommit.

1. In the IAM console, in the navigation pane, choose **Users**, and from the list of users, choose your IAM user. 
**Note**  
You can directly view and manage your CodeCommit credentials in **My Security Credentials**. For more information, see [View and manage your credentials](setting-up.md#setting-up-view-credentials).

1. On the user details page, choose the **Security Credentials** tab, and in **HTTPS Git credentials for AWS CodeCommit**, choose **Generate**.  
![\[Generating Git credentials in the IAM console\]](http://docs.aws.amazon.com/codecommit/latest/userguide/images/codecommit-iam-gc1.png)
**Note**  
You cannot choose your own user name or password for Git credentials. For more information, see [Use Git Credentials and HTTPS with CodeCommit](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html#git-credentials-code-commit).

1. Copy the user name and password that IAM generated for you, either by showing, copying, and then pasting this information into a secure file on your local computer, or by choosing **Download credentials** to download this information as a .CSV file. You need this information to connect to CodeCommit.  
![\[Downloading Git credentials from the IAM console\]](http://docs.aws.amazon.com/codecommit/latest/userguide/images/codecommit-iam-gc2.png)

   After you have saved your credentials, choose **Close**.
**Important**  
This is your only chance to save the user name and password. If you do not save them, you can copy the user name from the IAM console, but you cannot look up the password. You must reset the password and then save it.

## Step 4: Connect to the CodeCommit console and clone the repository
<a name="setting-up-gc-connect-console"></a>

If an administrator has already sent you the name and connection details for the CodeCommit repository, you can skip this step and clone the repository directly.

**To connect to a CodeCommit repository**

1. Open the CodeCommit console at [https://console.aws.amazon.com/codesuite/codecommit/home](https://console.aws.amazon.com/codesuite/codecommit/home).

1. In the region selector, choose the AWS Region where the repository was created. Repositories are specific to an AWS Region. For more information, see [Regions and Git connection endpoints](regions.md).

1. Find the repository you want to connect to from the list and choose it. Choose **Clone URL**, and then choose the protocol you want to use when cloning or connecting to the repository. This copies the clone URL.
   + Copy the HTTPS URL if you are using either Git credentials with your IAM user or the credential helper included with the AWS CLI.
   + Copy the HTTPS (GRC) URL if you are using the **git-remote-codecommit** command on your local computer.
   + Copy the SSH URL if you are using an SSH public/private key pair with your IAM user.
**Note**  
 If you see a **Welcome** page instead of a list of repositories, there are no repositories associated with your AWS account in the AWS Region where you are signed in. To create a repository, see [Create an AWS CodeCommit repository](how-to-create-repository.md) or follow the steps in the [Getting started with Git and CodeCommit](getting-started.md) tutorial.

1. Open a terminal, command line, or Git shell. Run the **git clone** command with the HTTPS clone URL you copied to clone the repository. For example, to clone a repository named *MyDemoRepo* to a local repo named *my-demo-repo* in the US East (Ohio) Region:

   ```
   git clone https://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo my-demo-repo
   ```

   The first time you connect, you are prompted for the user name and password for the repository. Depending on the configuration of your local computer, this prompt either originates from a credential management system for the operating system, a credential manager utility for your version of Git (for example, the Git Credential Manager included in Git for Windows), your IDE, or Git itself. Enter the user name and password generated for Git credentials in IAM (the ones you created in [Step 3: Create Git credentials for HTTPS connections to CodeCommit](#setting-up-gc-iam)). Depending on your operating system and other software, this information might be saved for you in a credential store or credential management utility. If so, you should not be prompted again unless you change the password, inactivate the Git credentials, or delete the Git credentials in IAM.

   If you do not have a credential store or credential management utility configured on your local computer, you can install one. For more information about Git and how it manages credentials, see [Credential Storage](https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage) in the Git documentation.

   For more information, see [Connect to the CodeCommit repository by cloning the repository](how-to-connect.md#how-to-connect-http) and [Create a commit](how-to-create-commit.md).

## Next steps
<a name="setting-up-gc-next-step"></a>

You have completed the prerequisites. Follow the steps in [Getting started with CodeCommit ](getting-started-cc.md) to start using CodeCommit.

To learn how to create and push your first commit, see [Create a commit in AWS CodeCommit](how-to-create-commit.md). If you're new to Git, you might also want to review the information in [Where can I learn more about Git?](welcome.md#welcome-get-started-with-git) and [Getting started with Git and AWS CodeCommit](getting-started.md).

# Setup steps for HTTPS connections to AWS CodeCommit with git-remote-codecommit
<a name="setting-up-git-remote-codecommit"></a>

If you want to connect to CodeCommit using a root account, federated access, or temporary credentials, you should set up access using **git-remote-codecommit**. This utility provides a simple method for pushing and pulling code from CodeCommit repositories by extending Git. It is the recommended method for supporting connections made with federated access, identity providers, and temporary credentials. To assign permissions to a federated identity, you create a role and define permissions for the role. When a federated identity authenticates, the identity is associated with the role and is granted the permissions that are defined by the role. For information about roles for federation, see [ Create a role for a third-party identity provider (federation)](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp.html) in the *IAM User Guide*. If you use IAM Identity Center, you configure a permission set. To control what your identities can access after they authenticate, IAM Identity Center correlates the permission set to a role in IAM. For information about permissions sets, see [ Permission sets](https://docs.aws.amazon.com/singlesignon/latest/userguide/permissionsetsconcept.html) in the *AWS IAM Identity Center User Guide*. 

You can also use **git-remote-codecommit** with an IAM user. Unlike other HTTPS connection methods, **git-remote-codecommit** does not require setting up Git credentials for the user.

**Note**  
Some IDEs do not support the clone URL format used by `git-remote-codecommit`. You might have to manually clone repositories to your local computer before you can work with them in your preferred IDE. For more information, see [Troubleshooting git-remote-codecommit and AWS CodeCommit](troubleshooting-grc.md).

These procedures are written with the assumption that you have an Amazon Web Services account, have created at least one repository in CodeCommit, and use an IAM user with a managed policy when connecting to CodeCommit repositories. For information about how to configure access for federated users and other rotating credential types, see [Connecting to AWS CodeCommit repositories with rotating credentials](temporary-access.md).

**Topics**
+ [Step 0: Install prerequisites for git-remote-codecommit](#setting-up-git-remote-codecommit-prereq)
+ [Step 1: Initial configuration for CodeCommit](#setting-up-git-remote-codecommit-account)
+ [Step 2: Install git-remote-codecommit](#setting-up-git-remote-codecommit-install)
+ [Step 3: Connect to the CodeCommit console and clone the repository](#setting-up-git-remote-codecommit-connect-console)
+ [Next steps](#setting-up-git-remote-codecommit-next-step)

## Step 0: Install prerequisites for git-remote-codecommit
<a name="setting-up-git-remote-codecommit-prereq"></a>

Before you can use **git-remote-codecommit**, you must install some prerequisites on your local computer. These include:
+ A supported version of Python. For more information about supported versions of Python, see [git-remote-codecommit](https://pypi.org/project/git-remote-codecommit/).

  For more information about setting up and using git-remote-codecommit, see [Setup steps for HTTPS connections to AWS CodeCommit with git-remote-codecommit](#setting-up-git-remote-codecommit).
+ Git

**Note**  
When you install Python on Windows, make sure that you choose the option to add Python to the path. 

**git-remote-codecommit** requires pip version 9.0.3 or later. To check your version of pip, open a terminal or command line and run the following command:

```
pip --version
```

You can run the following two commands to update your version of pip to the latest version:

```
curl -O https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py --user
```

To work with files, commits, and other information in CodeCommit repositories, you must install Git on your local machine. CodeCommit supports Git versions 1.7.9 and later. Git version 2.28 supports configuring the branch name for initial commits. We recommend using a recent version of Git.

To install Git, we recommend websites such as [Git Downloads](http://git-scm.com/downloads).

**Note**  
Git is an evolving, regularly updated platform. Occasionally, a feature change might affect the way it works with CodeCommit. If you encounter issues with a specific version of Git and CodeCommit, review the information in [Troubleshooting](troubleshooting.md).

## Step 1: Initial configuration for CodeCommit
<a name="setting-up-git-remote-codecommit-account"></a>

Follow these steps to create an IAM user, configure it with the appropriate policies, obtain an access key and secret key, and install and configure the AWS CLI. 

**To create and configure an IAM user for accessing CodeCommit**

1. Create an Amazon Web Services account by going to [http://aws.amazon.com](http://aws.amazon.com) and choosing **Sign Up**.

1. Create an IAM user, or use an existing one, in your Amazon Web Services account. Make sure you have an access key ID and a secret access key associated with that IAM user. For more information, see [Creating an IAM User in Your Amazon Web Services account](https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_SettingUpUser.html).
**Note**  
CodeCommit requires AWS Key Management Service. If you are using an existing IAM user, make sure there are no policies attached to the user that expressly deny the AWS KMS actions required by CodeCommit. For more information, see [AWS KMS and encryption](encryption.md).

1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/).

1. In the IAM console, in the navigation pane, choose **Users**, and then choose the IAM user you want to configure for CodeCommit access.

1. On the **Permissions** tab, choose **Add Permissions**. 

1. In **Grant permissions**, choose **Attach existing policies directly**.

1. From the list of policies, select **AWSCodeCommitPowerUser** or another managed policy for CodeCommit access. For more information, see [AWS managed policies for CodeCommit](security-iam-awsmanpol.md).

   After you have selected the policy you want to attach, choose **Next: Review** to review the list of policies to attach to the IAM user. If the list is correct, choose **Add permissions**.

    For more information about CodeCommit managed policies and sharing access to repositories with other groups and users, see [Share a repository](how-to-share-repository.md) and [Authentication and access control for AWS CodeCommit](auth-and-access-control.md).

**To install and configure the AWS CLI**

1. On your local machine, download and install the AWS CLI. This is a prerequisite for interacting with CodeCommit from the command line. We recommend that you install AWS CLI version 2. It is the most recent major version of the AWS CLI and supports all of the latest features. It is the only version of the AWS CLI that supports using a root account, federated access, or temporary credentials with **git-remote-codecommit**.

   For more information, see [Getting Set Up with the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html).
**Note**  
CodeCommit works only with AWS CLI versions 1.7.38 and later. As a best practice, install or upgrade the AWS CLI to the latest version available. To determine which version of the AWS CLI you have installed, run the **aws --version** command.  
To upgrade an older version of the AWS CLI to the latest version, see [Installing the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/installing.html).

1. Run this command to verify that the CodeCommit commands for the AWS CLI are installed.

   ```
   aws codecommit help
   ```

   This command returns a list of CodeCommit commands.

1. Configure the AWS CLI with a profile by using the **configure** command, as follows:.

   ```
   aws configure
   ```

   When prompted, specify the AWS access key and AWS secret access key of the IAM user to use with CodeCommit. Also, be sure to specify the AWS Region where the repository exists, such as `us-east-2`. When prompted for the default output format, specify `json`. For example, if you are configuring a profile for an IAM user:

   ```
   AWS Access Key ID [None]: Type your IAM user AWS access key ID here, and then press Enter
   AWS Secret Access Key [None]: Type your IAM user AWS secret access key here, and then press Enter
   Default region name [None]: Type a supported region for CodeCommit here, and then press Enter
   Default output format [None]: Type json here, and then press Enter
   ```

   For more information about creating and configuring profiles to use with the AWS CLI, see the following:
   + [Named Profiles](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
   + [Using an IAM Role in the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html)
   + [Set command](https://docs.aws.amazon.com/cli/latest/reference/set.html)
   + [Connecting to AWS CodeCommit repositories with rotating credentials](temporary-access.md)

   To connect to a repository or a resource in another AWS Region, you must reconfigure the AWS CLI with the default Region name. Supported default Region names for CodeCommit include:
   + us-east-2
   + us-east-1
   + eu-west-1
   + us-west-2
   + ap-northeast-1
   + ap-southeast-1
   + ap-southeast-2
   + ap-southeast-3
   + me-central-1
   + eu-central-1
   + ap-northeast-2
   + sa-east-1
   + us-west-1
   + eu-west-2
   + ap-south-1
   + ap-south-1
   + ca-central-1
   + us-gov-west-1
   + us-gov-east-1
   + eu-north-1
   + ap-east-1
   + me-south-1
   + cn-north-1
   + cn-northwest-1
   + eu-south-1
   + ap-northeast-3
   + af-south-1
   + il-central-1

   For more information about CodeCommit and AWS Region, see [Regions and Git connection endpoints](regions.md). For more information about IAM, access keys, and secret keys, see [How Do I Get Credentials?](https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_Introduction.html#IAM_SecurityCredentials) and [Managing Access Keys for IAM Users](https://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html). For more information about the AWS CLI and profiles, see [Named Profiles](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html).

## Step 2: Install git-remote-codecommit
<a name="setting-up-git-remote-codecommit-install"></a>

Follow these steps to install **git-remote-codecommit**.

**To install git-remote-codecommit**

1. At the terminal or command line, run the following command:

   ```
   pip install git-remote-codecommit
   ```
**Note**  
Depending on your operating system and configuration, you might need to run this command with elevated permissions, such as sudo, or use the --user parameter to install to a directory that doesn't require special privileges, such as your current user account. For example, on a computer running Linux, macOS, or Unix:  

   ```
   sudo pip install git-remote-codecommit
   ```
On a computer running Windows:  

   ```
   pip install --user git-remote-codecommit
   ```

1. Monitor the installation process until you see a success message.

## Step 3: Connect to the CodeCommit console and clone the repository
<a name="setting-up-git-remote-codecommit-connect-console"></a>

If an administrator has already sent you the clone URL to use with **git-remote-codecommit** for the CodeCommit repository, you can skip connecting to the console and clone the repository directly.

**To connect to a CodeCommit repository**

1. Open the CodeCommit console at [https://console.aws.amazon.com/codesuite/codecommit/home](https://console.aws.amazon.com/codesuite/codecommit/home).

1. In the region selector, choose the AWS Region where the repository was created. Repositories are specific to an AWS Region. For more information, see [Regions and Git connection endpoints](regions.md).

1. Find the repository you want to connect to from the list and choose it. Choose **Clone URL**, and then choose the protocol you want to use when cloning or connecting to the repository. This copies the clone URL.
   + Copy the HTTPS URL if you are using either Git credentials with your IAM user or the credential helper included with the AWS CLI.
   + Copy the HTTPS (GRC) URL if you are using the **git-remote-codecommit** command on your local computer.
   + Copy the SSH URL if you are using an SSH public/private key pair with your IAM user.
**Note**  
 If you see a **Welcome** page instead of a list of repositories, there are no repositories associated with your AWS account in the AWS Region where you are signed in. To create a repository, see [Create an AWS CodeCommit repository](how-to-create-repository.md) or follow the steps in the [Getting started with Git and CodeCommit](getting-started.md) tutorial.

1. At the terminal or command prompt, clone the repository with the **git clone** command. Use the HTTPS git-remote-codecommit URL you copied and the name of the AWS CLI profile, if you created a named profile. If you do not specify a profile, the command assumes the default profile. The local repo is created in a subdirectory of the directory where you run the command. For example, to clone a repository named *MyDemoRepo* to a local repo named *my-demo-repo*:

   ```
   git clone codecommit://MyDemoRepo my-demo-repo
   ```

   To clone the same repository using a profile named *CodeCommitProfile*: 

   ```
   git clone codecommit://CodeCommitProfile@MyDemoRepo my-demo-repo
   ```

   To clone a repository in a different AWS Region than the one configured in your profile, include the AWS Region name. For example:

   ```
   git clone codecommit::ap-northeast-1://MyDemoRepo my-demo-repo
   ```

## Next steps
<a name="setting-up-git-remote-codecommit-next-step"></a>

You have completed the prerequisites. Follow the steps in [Getting started with CodeCommit ](getting-started-cc.md) to start using CodeCommit.

To learn how to create and push your first commit, see [Create a commit in AWS CodeCommit](how-to-create-commit.md). If you're new to Git, you might also want to review the information in [Where can I learn more about Git?](welcome.md#welcome-get-started-with-git) and [Getting started with Git and AWS CodeCommit](getting-started.md).

# Set up connections from development tools using Git credentials
<a name="setting-up-ide"></a>

After you have configured Git credentials for AWS CodeCommit in the IAM console, you can use those credentials with any development tool that supports Git credentials. For example, you can configure access to your CodeCommit repository in AWS Cloud9, Visual Studio, Xcode, IntelliJ, or any integrated development environment (IDE) that integrates Git credentials. After you configure access, you can edit your code, commit your changes, and push directly from the IDE or other development tool. 

**Note**  
If you access CodeCommit repositories using federated access, temporary credentials, or a web idenity provider, you cannot use Git credentials. We recommend that you set up your local computer using the `git-remote-codecommit` command. However, not all IDEs are fully compatible with Git remote helpers such as **git-remote-codecommit**. If you encounter problems, see [Troubleshooting git-remote-codecommit and AWS CodeCommit](troubleshooting-grc.md).

**Topics**
+ [Integrate AWS Cloud9 with AWS CodeCommit](setting-up-ide-c9.md)
+ [Integrate Visual Studio with AWS CodeCommit](setting-up-ide-vs.md)

When prompted by your IDE or development tool for the user name and password used to connect to the CodeCommit repository, provide the Git credentials for **User name** and **Password** you created in IAM. 

For more information about AWS Regions and endpoints for CodeCommit, see [Regions and Git connection endpoints](regions.md).

You might also see a prompt from your operating system to store your user name and password. For example, in Windows, you would provide your Git credentials as follows:

![\[A security prompt in Windows\]](http://docs.aws.amazon.com/codecommit/latest/userguide/images/codecommit-ide-vs2.png)


For information about configuring Git credentials for a particular software program or development tool, consult the product documentation. 

The following is not a comprehensive list of IDEs. The links are provided solely to help you learn more about these tools. AWS is not responsible for the content of any of these topics. 
+ [AWS Cloud9](setting-up-ide-c9.md)  
![\[Cloning a repository in AWS Cloud9.\]](http://docs.aws.amazon.com/codecommit/latest/userguide/images/codecommit-ide-c9-clone.png)
+ [Visual Studio](https://www.visualstudio.com/en-us/docs/git/tutorial/creatingrepo#clone-an-existing-git-repo)

  Alternatively, install the AWS Toolkit for Visual Studio. For more information, see [Integrate Visual Studio with AWS CodeCommit](setting-up-ide-vs.md).  
![\[Cloning a repository in Visual Studio.\]](http://docs.aws.amazon.com/codecommit/latest/userguide/images/codecommit-ide-vs1.png)
+ [XCode](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/xcode_guide-continuous_integration/PublishYourCodetoaSourceRepository.html)

# Integrate AWS Cloud9 with AWS CodeCommit
<a name="setting-up-ide-c9"></a>

You can use AWS Cloud9 to make code changes in a CodeCommit repository. AWS Cloud9 contains a collection of tools that you can use to write code and build, run, test, debug, and release software. You can clone existing repositories, create repositories, commit and push code changes to a repository, and more, all from your AWS Cloud9 EC2 development environment. The AWS Cloud9 EC2 development environment is generally preconfigured with the AWS CLI, an Amazon EC2 role, and Git, so in most cases, you can run a few simple commands and start interacting with your repository.

To use AWS Cloud9 with CodeCommit, you need the following:
+ An AWS Cloud9 EC2 development environment running on Amazon Linux.
+ The AWS Cloud9 IDE open in a web browser.
+ An IAM user with one of the CodeCommit managed policies and one of the AWS Cloud9 managed policies applied to it.

  For more information, see [AWS managed policies for CodeCommit](security-iam-awsmanpol.md) and [Understanding and Getting Your Security Credentials](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html).
**Note**  
This topic describes setting up integration with CodeCommit and AWS Cloud9 with general access from the Internet. You can set up access to CodeCommit and AWS Cloud9 in an isolated environment, but that requires additional steps. For more information, see:  
[Using AWS CodeCommit with interface VPC endpoints](codecommit-and-interface-VPC.md)
[Accessing no-ingress Amazon EC2 instances with AWS Systems Manager](https://docs.aws.amazon.com/cloud9/latest/user-guide/ec2-ssm.html)
[Working with Shared Environments](https://docs.aws.amazon.com/cloud9/latest/user-guide/share-environment.html)
[Share your VPC with other accounts](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-sharing.html)
[Blog post: Isolating network access to your AWS Cloud9 environments](https://aws.amazon.com/blogs/security/isolating-network-access-to-your-aws-cloud9-environments/)

**Topics**
+ [Step 1: Create an AWS Cloud9 development environment](#setting-up-ide-c9-connect)
+ [Step 2: Configure the AWS CLI credential helper on your AWS Cloud9 EC2 development environment](#setting-up-ide-c9-credentials)
+ [Step 3: Clone a CodeCommit repository into your AWS Cloud9 EC2 development environment](#setting-up-ide-c9-checkout)
+ [Next steps](#setting-up-ide-c9-next)

## Step 1: Create an AWS Cloud9 development environment
<a name="setting-up-ide-c9-connect"></a>

AWS Cloud9 hosts your development environment on an Amazon EC2 instance. This is the easiest way to integrate, because you can use the AWS managed temporary credentials for the instance to connect to your CodeCommit repository. If you want to use your own server instead, see the [AWS Cloud9 User Guide](https://docs.aws.amazon.com/cloud9/latest/user-guide/). 

**To create an AWS Cloud9 environment**

1. Sign in to AWS as the IAM user you've configured and open the AWS Cloud9 console.

1. In the AWS Cloud9 console, choose **Create environment**.

1. In **Step 1: Name environment**, enter a name and optional description for the environment, and then choose **Next step**.

1. In **Step 2: Configure Settings**, configure your environment as follows:
   + In **Environment type**, choose **Create a new instance for environment (EC2)**.
   + In **Instance type**, choose the appropriate instance type for your development environment. For example, if you're just exploring the service, you might choose the default of t2.micro. If you intend to use this environment for development work, choose a larger instance type.
   + Accept the other default settings unless you have reasons to choose otherwise (for example, your organization uses a specific VPC, or your Amazon Web Services account does not have any VPCs configured), and then choose **Next step**.

1. In **Step 3: Review**, review your settings. Choose **Previous step** if you want to make any changes. If not, choose **Create environment**.

   Creating an environment and connecting to it for the first time takes several minutes. If it seems to take an unusally long time, see [Troubleshooting](https://docs.aws.amazon.com/cloud9/latest/user-guide/troubleshooting.html) in the *AWS Cloud9 User Guide*.

1. After you are connected to your environment, check to see if Git is already installed and is a supported version by running the **git --version** command in the terminal window.

   If Git is not installed, or if it is not a supported version, install a supported version. CodeCommit supports Git versions 1.7.9 and later. Git version 2.28 supports configuring the branch name for initial commits. We recommend using a recent version of Git. To install Git, we recommend websites such as [Git Downloads](http://git-scm.com/downloads). 
**Tip**  
Depending on the operating system of your environment, you might be able to use the **yum** command with the **sudo** option to install updates, including Git. For example, an administrative command sequence might resemble the following three commands:  

   ```
   sudo yum -y update
   sudo yum -y install git
   git --version
   ```

    

1. Configure a user name and email to be associated with your Git commits by running the** git config** command. For example:

   ```
       git config --global user.name "Mary Major"
       git config --global user.email mary.major@example.com
   ```

## Step 2: Configure the AWS CLI credential helper on your AWS Cloud9 EC2 development environment
<a name="setting-up-ide-c9-credentials"></a>

After you've created an AWS Cloud9 environment, you can configure the AWS CLI credential helper to manage the credentials for connections to your CodeCommit repository. The AWS Cloud9 development environment comes with AWS managed temporary credentials that are associated with your IAM user. You use these credentials with the AWS CLI credential helper.

1. Open the terminal window and run the following command to verify that the AWS CLI is installed:

   ```
   aws --version
   ```

   If successful, this command returns the currently installed version of the AWS CLI. To upgrade an older version of the AWS CLI to the latest version, see [Installing the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/installing.html).

1. At the terminal, run the following commands to configure the AWS CLI credential helper for HTTPS connections:

   ```
   git config --global credential.helper '!aws codecommit credential-helper $@'
   git config --global credential.UseHttpPath true
   ```
**Tip**  
The credential helper uses the default Amazon EC2 instance role for your development environment. If you intend to use the development environment to connect to repositories that are not hosted in CodeCommit, either configure SSH connections to those repositories, or configure a local `.gitconfig` file to use an alternative credential management system when connecting to those other repositories. For more information, see [Git Tools - Credential Storage](https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage) on the Git website.

## Step 3: Clone a CodeCommit repository into your AWS Cloud9 EC2 development environment
<a name="setting-up-ide-c9-checkout"></a>

After you've configured the AWS CLI credential helper, you can clone your CodeCommit repository onto it. Then you can start working with the code.

1. In the terminal, run the **git clone** command, specifying the HTTPS clone URL of the repository you want to clone. For example, if you want to clone a repository named MyDemoRepo in the US East (Ohio) Region, you would enter:

   ```
   git clone https://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo
   ```
**Tip**  
You can find the Clone URL for your repository in the CodeCommit console by choosing **Clone URL**.

1. When the cloning is complete, in the side navigation, expand the folder for your repository, and choose the file you want to open for editing. Alternatively, choose **File** and then choose **New File** to create a file.

1. When you have finished editing or creating files, in the terminal window, change directories to your cloned repository and then commit and push your changes. For example, if you added a new file named *MyFile.py*:

   ```
   cd MyDemoRepo
   git commit -a MyFile.py
   git commit -m "Added a new file with some code improvements"
   git push
   ```

## Next steps
<a name="setting-up-ide-c9-next"></a>

For more information, see the [AWS Cloud9 User Guide](https://docs.aws.amazon.com/cloud9/latest/user-guide/welcome.html) and [CodeCommit sample for AWS Cloud9](https://docs.aws.amazon.com/cloud9/latest/user-guide/sample-codecommit.html). For more information about using Git with CodeCommit, see [Getting started with Git and AWS CodeCommit](getting-started.md).

# Integrate Visual Studio with AWS CodeCommit
<a name="setting-up-ide-vs"></a>

You can use Visual Studio to make code changes in a CodeCommit repository. The AWS Toolkit for Visual Studio now includes features that make working with CodeCommit easier and more convenient when working in Visual Studio.. The Toolkit for Visual Studio integration is designed to work with Git credentials and an IAM user. You can clone existing repositories, create repositories, commit and push code changes to a repository, and more. 

**Important**  
The Toolkit for Visual Studio is available for installation on Windows operating systems only. If you are looking for information about working with Visual Studio Code, see [AWS Toolkit for Visual Studio Code](https://docs.aws.amazon.com/toolkit-for-vscode/latest/userguide/welcome.html). 

If you've used the Toolkit for Visual Studio before, you're probably already familiar with setting up AWS credential profiles that contain an access key and secret key. Credential profiles are used in the Toolkit for Visual Studio to enable calls to AWS service APIs (for example, to Amazon S3 to list buckets or to CodeCommit to list repositories). To pull and push code to a CodeCommit repository, you also need Git credentials. If you don't have Git credentials, the Toolkit for Visual Studio can generate and apply those credentials for you. This can save you a lot of time.

To use Visual Studio with CodeCommit, you need the following:
+ An IAM user with a valid set of credentials (an access key and secret key) configured for it. This IAM user should also have:

  One of the CodeCommit managed policies and the IAMSelfManageServiceSpecificCredentials managed policy applied to it.

  OR

  If the IAM user already has Git credentials configured, one of the CodeCommit managed policies or equivalent permissions.

   For more information, see [AWS managed policies for CodeCommit](security-iam-awsmanpol.md) and [Understanding and Getting Your Security Credentials](https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html).
+ The AWS Toolkit for Visual Studio installed on the computer where you've installed Visual Studio. For more information, see [Setting Up the AWS Toolkit for Visual Studio](https://docs.aws.amazon.com/AWSToolkitVS/latest/UserGuide/getting-set-up.html).

For more information on using AWS Toolkit for Visual Studio with CodeCommit, see [Using AWS CodeCommit with Visual Studio Team Explorer](https://docs.aws.amazon.com/toolkit-for-visual-studio/latest/user-guide/using-aws-codecommit-with-team-explorer.html) in the *Toolkit for Visual Studio User Guide*.

# Setup for SSH users not using the AWS CLI
<a name="setting-up-without-cli"></a>

If you want to use SSH connections for your repository, you can connect to AWS CodeCommit without installing the AWS CLI. The AWS CLI includes commands that are useful when you use and manage CodeCommit repositories, but it is not required for initial setup.

This topic assumes:
+ You have set up an IAM user with the policies or permissions required for CodeCommit and the **IAMUserSSHKeys** managed policy or equivalent permissions required for uploading keys. For more information, see [Using identity-based policies (IAM Policies) for CodeCommit](auth-and-access-control-iam-identity-based-access-control.md).
+ You already have, or know how to create, a public-private key pair. We strongly recommend that you use a secure passphrase for your SSH key. 
+ You are familiar with SSH, your Git client, and its configuration files. 
+ If you are using Windows, you have installed a command-line utility, such as Git Bash, that emulates the bash shell. 

If you need more guidance, follow the instructions in [For SSH connections on Linux, macOS, or Unix](setting-up-ssh-unixes.md) or [For SSH connections on Windows](setting-up-ssh-windows.md).

**Topics**
+ [Step 1: Associate your public key with your IAM user](#setting-up-without-cli-add-key)
+ [Step 2: Add CodeCommit to your SSH configuration](#setting-up-without-cli-configure-client)
+ [Next steps](#setting-up-without-cli-next-step)

## Step 1: Associate your public key with your IAM user
<a name="setting-up-without-cli-add-key"></a>

1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/).

1. In the IAM console, in the navigation pane, choose **Users**, and from the list of users, choose your IAM user. 

1. On the **Security Credentials** tab, choose **Upload SSH public key**.

1. Paste the contents of your SSH public key into the field, and then choose **Upload SSH Key**. 
**Tip**  
The public-private key pair must be SSH-2 RSA, in OpenSSH format, and contain 2048 bits. The key looks similar to this:  

   ```
   ssh-rsa EXAMPLE-AfICCQD6m7oRw0uXOjANBgkqhkiG9w0BAQUFADCBiDELMAkGA1UEBhMCVVMxCzAJB
   gNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb2
   5zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wHhc
   NMTEwNDI1MjA0NTIxWhcNMTIwNDI0MjA0NTIxWjCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAw
   DgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDAS=EXAMPLE user-name@ip-192-0-2-137
   ```
IAM accepts public keys in the OpenSSH format only. If you provide your public key in another format, you see an error message that says the key format is not valid. 

1. Copy the SSH key ID (for example, *APKAEIBAERJR2EXAMPLE*) and close the console.  
![\[The SSH key ID in the IAM console\]](http://docs.aws.amazon.com/codecommit/latest/userguide/images/codecommit-ssh-key-id-iam.png)

## Step 2: Add CodeCommit to your SSH configuration
<a name="setting-up-without-cli-configure-client"></a>

1. At the terminal (Linux, macOS, or Unix) or bash emulator (Windows), edit your SSH configuration file by typing **cat>> \$1/.ssh/config**:

   ```
   Host git-codecommit.*.amazonaws.com
   User Your-SSH-Key-ID, such as APKAEIBAERJR2EXAMPLE
   IdentityFile Your-Private-Key-File, such as ~/.ssh/codecommit_rsa or ~/.ssh/id_rsa
   ```
**Tip**  
If you have more than one SSH configuration, make sure you include the blank lines before and after the content. Save the file by pressing the `Ctrl` and `d` keys simultaneously.

1. Run the following command to test your SSH configuration:

   ```
   ssh git-codecommit.us-east-2.amazonaws.com
   ```

   Enter the passphrase for your SSH key file when prompted. If everything is configured correctly, you should see the following success message:

   ```
   You have successfully authenticated over SSH. You can use Git to interact with CodeCommit. 
   ```

## Next steps
<a name="setting-up-without-cli-next-step"></a>

You have completed the prerequisites. Follow the steps in [Getting started with CodeCommit ](getting-started-cc.md) to start using CodeCommit.

To connect to a repository, follow the steps in [Connect to a repository](how-to-connect.md). To create a repository, follow the steps in [Create a repository](how-to-create-repository.md).

# Setup steps for SSH connections to AWS CodeCommit repositories on Linux, macOS, or Unix
<a name="setting-up-ssh-unixes"></a>

Before you can connect to CodeCommit for the first time, you must complete some initial configuration steps. After you set up your computer and AWS profile, you can connect to a CodeCommit repository and clone that repository to your computer (also known as creating a local repo). If you're new to Git, you might also want to review the information in [Where can I learn more about Git?](welcome.md#welcome-get-started-with-git).

**Topics**
+ [Step 1: Initial configuration for CodeCommit](#setting-up-ssh-unixes-account)
+ [Step 2: Install Git](#setting-up-ssh-unixes-install-git)
+ [Step 3: Configure credentials on Linux, macOS, or Unix](#setting-up-ssh-unixes-keys)
+ [Step 4: Connect to the CodeCommit console and clone the repository](#setting-up-ssh-unixes-connect-console)
+ [Next steps](#setting-up-ssh-unixes-next-step)

## Step 1: Initial configuration for CodeCommit
<a name="setting-up-ssh-unixes-account"></a>

Follow these steps to set up an Amazon Web Services account, create an IAM user, and configure access to CodeCommit. 

**To create and configure an IAM user for accessing CodeCommit**

1. Create an Amazon Web Services account by going to [http://aws.amazon.com](http://aws.amazon.com) and choosing **Sign Up**.

1. Create an IAM user, or use an existing one, in your Amazon Web Services account. Make sure you have an access key ID and a secret access key associated with that IAM user. For more information, see [Creating an IAM User in Your Amazon Web Services account](https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_SettingUpUser.html).
**Note**  
CodeCommit requires AWS Key Management Service. If you are using an existing IAM user, make sure there are no policies attached to the user that expressly deny the AWS KMS actions required by CodeCommit. For more information, see [AWS KMS and encryption](encryption.md).

1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/).

1. In the IAM console, in the navigation pane, choose **Users**, and then choose the IAM user you want to configure for CodeCommit access.

1. On the **Permissions** tab, choose **Add Permissions**. 

1. In **Grant permissions**, choose **Attach existing policies directly**.

1. From the list of policies, select **AWSCodeCommitPowerUser** or another managed policy for CodeCommit access. For more information, see [AWS managed policies for CodeCommit](security-iam-awsmanpol.md).

   After you have selected the policy you want to attach, choose **Next: Review** to review the list of policies to attach to the IAM user. If the list is correct, choose **Add permissions**.

    For more information about CodeCommit managed policies and sharing access to repositories with other groups and users, see [Share a repository](how-to-share-repository.md) and [Authentication and access control for AWS CodeCommit](auth-and-access-control.md).

**Note**  
If you want to use AWS CLI commands with CodeCommit, install the AWS CLI. For more information, see [Command line reference](cmd-ref.md).

## Step 2: Install Git
<a name="setting-up-ssh-unixes-install-git"></a>

To work with files, commits, and other information in CodeCommit repositories, you must install Git on your local machine. CodeCommit supports Git versions 1.7.9 and later. Git version 2.28 supports configuring the branch name for initial commits. We recommend using a recent version of Git.

To install Git, we recommend websites such as [Git Downloads](http://git-scm.com/downloads).

**Note**  
Git is an evolving, regularly updated platform. Occasionally, a feature change might affect the way it works with CodeCommit. If you encounter issues with a specific version of Git and CodeCommit, review the information in [Troubleshooting](troubleshooting.md).

## Step 3: Configure credentials on Linux, macOS, or Unix
<a name="setting-up-ssh-unixes-keys"></a>

### SSH and Linux, macOS, or Unix: Set up the public and private keys for Git and CodeCommit
<a name="setting-up-ssh-unixes-keys-unixes"></a>

**To set up the public and private keys for Git and CodeCommit**

1. From the terminal on your local machine, run the **ssh-keygen** command, and follow the directions to save the file to the .ssh directory for your profile. 
**Note**  
Be sure to check with your system administrator about where key files should be stored and which file naming pattern should be used.

   For example:

   ```
   $ ssh-keygen
   
   Generating public/private rsa key pair.
   Enter file in which to save the key (/home/user-name/.ssh/id_rsa): Type /home/your-user-name/.ssh/ and a file name here, for example /home/your-user-name/.ssh/codecommit_rsa
   
   Enter passphrase (empty for no passphrase): <Type a passphrase, and then press Enter>
   Enter same passphrase again: <Type the passphrase again, and then press Enter>
   
   Your identification has been saved in /home/user-name/.ssh/codecommit_rsa.
   Your public key has been saved in /home/user-name/.ssh/codecommit_rsa.pub.
   The key fingerprint is:
   45:63:d5:99:0e:99:73:50:5e:d4:b3:2d:86:4a:2c:14 user-name@client-name
   The key's randomart image is:
   +--[ RSA 2048]----+
   |        E.+.o*.++|
   |        .o .=.=o.|
   |       . ..  *. +|
   |        ..o . +..|
   |        So . . . |
   |          .      |
   |                 |
   |                 |
   |                 |
   +-----------------+
   ```

   This generates: 
   + The *codecommit\$1rsa* file, which is the private key file.
   + The *codecommit\$1rsa.pub* file, which is the public key file.
**Tip**  
By default, **ssh-keygen** generates a 2048 bit key. You can use the -t and -b parameters to specify the type and length of the key. If you want a 4096 bit key in the rsa format, you would specify this by running the command with the following parameters:   

   ```
   ssh-keygen -t rsa -b 4096
   ```
For more information about the formats and lengths required for SSH keys, see [Using IAM with CodeCommit](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html#ssh-keys-code-commit).

1. Run the following command to display the value of the public key file (*codecommit\$1rsa.pub*):

   ```
   cat ~/.ssh/codecommit_rsa.pub
   ```

   Copy this value. It looks similar to the following:

   ```
   ssh-rsa EXAMPLE-AfICCQD6m7oRw0uXOjANBgkqhkiG9w0BAQUFADCBiDELMAkGA1UEBhMCVVMxCzAJB
   gNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb2
   5zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wHhc
   NMTEwNDI1MjA0NTIxWhcNMTIwNDI0MjA0NTIxWjCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAw
   DgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDAS=EXAMPLE user-name@ip-192-0-2-137
   ```

1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/).
**Note**  
You can directly view and manage your CodeCommit credentials in **My Security Credentials**. For more information, see [View and manage your credentials](setting-up.md#setting-up-view-credentials).

1. In the IAM console, in the navigation pane, choose **Users**, and from the list of users, choose your IAM user. 

1. On the user details page, choose the **Security Credentials** tab, and then choose **Upload SSH public key**.

1. Paste the contents of your SSH public key into the field, and then choose **Upload SSH public key**. 

1. Copy or save the information in **SSH Key ID** (for example, *APKAEIBAERJR2EXAMPLE*).   
![\[The SSH Key ID in the IAM console\]](http://docs.aws.amazon.com/codecommit/latest/userguide/images/codecommit-ssh-key-id-iam.png)
**Note**  
If you have more than one SSH key IDs uploaded, the keys are listed alphabetically by key ID, not by upload date. Make sure that you have copied the key ID that is associated with the correct upload date.

1. On your local machine, use a text editor to create a config file in the \$1/.ssh directory, and then add the following lines to the file, where the value for *User* is the SSH key ID you copied earlier:

   ```
   Host git-codecommit.*.amazonaws.com
     User APKAEIBAERJR2EXAMPLE
     IdentityFile ~/.ssh/codecommit_rsa
   ```
**Note**  
If you gave your private key file a name other than *codecommit\$1rsa*, be sure to use it here.  
You can set up SSH access to repositories in multiple Amazon Web Services accounts, For more information, see [Troubleshooting SSH connections to AWS CodeCommit](troubleshooting-ssh.md).

   Save and name this file `config`.

1. From the terminal, run the following command to change the permissions for the config file:

   ```
   chmod 600 config
   ```

1. Run the following command to test your SSH configuration:

   ```
   ssh git-codecommit.us-east-2.amazonaws.com
   ```

   You are asked to confirm the connection because `git-codecommit.us-east-2.amazonaws.com` is not yet included in your known hosts file. The CodeCommit server fingerprint is displayed as part of the verification (`a9:6d:03:ed:08:42:21:be:06:e1:e0:2a:d1:75:31:5e` for MD5 or `3lBlW2g5xn/NA2Ck6dyeJIrQOWvn7n8UEs56fG6ZIzQ` for SHA256).
**Note**  
CodeCommit server fingerprints are unique for every AWS Region. To view the server fingerprints for an AWS Region, see [Server fingerprints for CodeCommit](regions.md#regions-fingerprints).

   After you have confirmed the connection, you should see confirmation that you have added the server to your known hosts file and a successful connection message. If you do not see a success message, check that you saved the `config` file in the \$1/.ssh directory of the IAM user you configured for access to CodeCommit, and that you specified the correct private key file. 

   For information to help you troubleshoot problems, run the `ssh` command with the `-v` parameter. For example:

   ```
   ssh -v git-codecommit.us-east-2.amazonaws.com
   ```

   For information to help you troubleshoot connection problems, see [Troubleshooting SSH connections to AWS CodeCommit](troubleshooting-ssh.md).

## Step 4: Connect to the CodeCommit console and clone the repository
<a name="setting-up-ssh-unixes-connect-console"></a>

If an administrator has already sent you the name and connection details for the CodeCommit repository, you can skip this step and clone the repository directly.

**To connect to a CodeCommit repository**

1. Open the CodeCommit console at [https://console.aws.amazon.com/codesuite/codecommit/home](https://console.aws.amazon.com/codesuite/codecommit/home).

1. In the region selector, choose the AWS Region where the repository was created. Repositories are specific to an AWS Region. For more information, see [Regions and Git connection endpoints](regions.md).

1. Find the repository you want to connect to from the list and choose it. Choose **Clone URL**, and then choose the protocol you want to use when cloning or connecting to the repository. This copies the clone URL.
   + Copy the HTTPS URL if you are using either Git credentials with your IAM user or the credential helper included with the AWS CLI.
   + Copy the HTTPS (GRC) URL if you are using the **git-remote-codecommit** command on your local computer.
   + Copy the SSH URL if you are using an SSH public/private key pair with your IAM user.
**Note**  
 If you see a **Welcome** page instead of a list of repositories, there are no repositories associated with your AWS account in the AWS Region where you are signed in. To create a repository, see [Create an AWS CodeCommit repository](how-to-create-repository.md) or follow the steps in the [Getting started with Git and CodeCommit](getting-started.md) tutorial.

1. Open a terminal. From the /tmp directory, run the **git clone** command with the SSH URL you copied to clone the repository. For example, to clone a repository named *MyDemoRepo* to a local repo named *my-demo-repo* in the US East (Ohio) Region:

   ```
   git clone ssh://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo my-demo-repo
   ```
**Note**  
If you successfully tested your connection, but the clone command fails, you might not have the required access to your config file, or another setting might be in conflict with your config file. Try connecting again, this time including the SSH key ID in the command. For example:  

   ```
   git clone ssh://Your-SSH-Key-ID@git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo my-demo-repo
   ```
For more information, see [Access error: Public key is uploaded successfully to IAM but connection fails on Linux, macOS, or Unix systems](troubleshooting-ssh.md#troubleshooting-ae4).

   For more information about how to connect to repositories, see [Connect to the CodeCommit repository by cloning the repository](how-to-connect.md#how-to-connect-http).

## Next steps
<a name="setting-up-ssh-unixes-next-step"></a>

You have completed the prerequisites. Follow the steps in [Getting started with CodeCommit ](getting-started-cc.md) to start using CodeCommit.

# Setup steps for SSH connections to AWS CodeCommit repositories on Windows
<a name="setting-up-ssh-windows"></a>

Before you can connect to AWS CodeCommit for the first time, you must complete some initial configuration steps. After you set up your computer and AWS profile, you can connect to a CodeCommit repository and clone that repository to your computer (also known as creating a local repo). If you're new to Git, you might also want to review the information in [Where can I learn more about Git?](welcome.md#welcome-get-started-with-git).

**Topics**
+ [Step 1: Initial configuration for CodeCommit](#setting-up-ssh-windows-account)
+ [Step 2: Install Git](#setting-up-ssh-windows-install-git)
+ [Step 3: Set up the public and private keys for Git and CodeCommit](#setting-up-ssh-windows-keys-windows)
+ [Step 4: Connect to the CodeCommit console and clone the repository](#setting-up-ssh-windows-connect-console)
+ [Next steps](#setting-up-ssh-windows-next-step)

## Step 1: Initial configuration for CodeCommit
<a name="setting-up-ssh-windows-account"></a>

Follow these steps to set up an Amazon Web Services account, create an IAM user, and configure access to CodeCommit. 

**To create and configure an IAM user for accessing CodeCommit**

1. Create an Amazon Web Services account by going to [http://aws.amazon.com](http://aws.amazon.com) and choosing **Sign Up**.

1. Create an IAM user, or use an existing one, in your Amazon Web Services account. Make sure you have an access key ID and a secret access key associated with that IAM user. For more information, see [Creating an IAM User in Your Amazon Web Services account](https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_SettingUpUser.html).
**Note**  
CodeCommit requires AWS Key Management Service. If you are using an existing IAM user, make sure there are no policies attached to the user that expressly deny the AWS KMS actions required by CodeCommit. For more information, see [AWS KMS and encryption](encryption.md).

1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/).

1. In the IAM console, in the navigation pane, choose **Users**, and then choose the IAM user you want to configure for CodeCommit access.

1. On the **Permissions** tab, choose **Add Permissions**. 

1. In **Grant permissions**, choose **Attach existing policies directly**.

1. From the list of policies, select **AWSCodeCommitPowerUser** or another managed policy for CodeCommit access. For more information, see [AWS managed policies for CodeCommit](security-iam-awsmanpol.md).

   After you have selected the policy you want to attach, choose **Next: Review** to review the list of policies to attach to the IAM user. If the list is correct, choose **Add permissions**.

    For more information about CodeCommit managed policies and sharing access to repositories with other groups and users, see [Share a repository](how-to-share-repository.md) and [Authentication and access control for AWS CodeCommit](auth-and-access-control.md).

**Note**  
If you want to use AWS CLI commands with CodeCommit, install the AWS CLI. For more information, see [Command line reference](cmd-ref.md).

## Step 2: Install Git
<a name="setting-up-ssh-windows-install-git"></a>

To work with files, commits, and other information in CodeCommit repositories, you must install Git on your local machine. CodeCommit supports Git versions 1.7.9 and later. Git version 2.28 supports configuring the branch name for initial commits. We recommend using a recent version of Git.

To install Git, we recommend websites such as [Git Downloads](http://git-scm.com/downloads).

**Note**  
Git is an evolving, regularly updated platform. Occasionally, a feature change might affect the way it works with CodeCommit. If you encounter issues with a specific version of Git and CodeCommit, review the information in [Troubleshooting](troubleshooting.md).

If the version of Git you installed does not include a Bash emulator, such as Git Bash, install one. You use this emulator instead of the Windows command line when you configure SSH connections.

## Step 3: Set up the public and private keys for Git and CodeCommit
<a name="setting-up-ssh-windows-keys-windows"></a>

**To set up the public and private keys for Git and CodeCommit on Windows**

1. Open the Bash emulator.
**Note**  
You might need to run the emulator with administrative permissions.

   From the emulator, run the **ssh-keygen** command, and follow the directions to save the file to the .ssh directory for your profile. 

   For example:

   ```
   $ ssh-keygen
   
   Generating public/private rsa key pair.
   Enter file in which to save the key (/drive/Users/user-name/.ssh/id_rsa): Type a file name here, for example /c/Users/user-name/.ssh/codecommit_rsa
   
   Enter passphrase (empty for no passphrase): <Type a passphrase, and then press Enter>
   Enter same passphrase again: <Type the passphrase again, and then press Enter>
   
   Your identification has been saved in drive/Users/user-name/.ssh/codecommit_rsa.
   Your public key has been saved in drive/Users/user-name/.ssh/codecommit_rsa.pub.
   The key fingerprint is:
   45:63:d5:99:0e:99:73:50:5e:d4:b3:2d:86:4a:2c:14 user-name@client-name
   The key's randomart image is:
   +--[ RSA 2048]----+
   |        E.+.o*.++|
   |        .o .=.=o.|
   |       . ..  *. +|
   |        ..o . +..|
   |        So . . . |
   |          .      |
   |                 |
   |                 |
   |                 |
   +-----------------+
   ```

   This generates: 
   + The *codecommit\$1rsa* file, which is the private key file.
   + The *codecommit\$1rsa*.pub file, which is the public key file.
**Tip**  
By default, **ssh-keygen** generates a 2048 bit key. You can use the -t and -b parameters to specify the type and length of the key. If you want a 4096 bit key in the rsa format, you would specify this by running the command with the following parameters:   

   ```
   ssh-keygen -t rsa -b 4096
   ```
For more information about the formats and lengths required for SSH keys, see [Using IAM with CodeCommit](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html#ssh-keys-code-commit).

1. Run the following commands to display the value of the public key file (*codecommit\$1rsa*.pub):

   ```
   cd .ssh
   notepad codecommit_rsa.pub
   ```

   Copy the contents of the file, and then close Notepad without saving. The contents of the file look similar to the following:

   ```
   ssh-rsa EXAMPLE-AfICCQD6m7oRw0uXOjANBgkqhkiG9w0BAQUFADCBiDELMAkGA1UEBhMCVVMxCzAJB
   gNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDASBgNVBAsTC0lBTSBDb2
   5zb2xlMRIwEAYDVQQDEwlUZXN0Q2lsYWMxHzAdBgkqhkiG9w0BCQEWEG5vb25lQGFtYXpvbi5jb20wHhc
   NMTEwNDI1MjA0NTIxWhcNMTIwNDI0MjA0NTIxWjCBiDELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAldBMRAw
   DgYDVQQHEwdTZWF0dGxlMQ8wDQYDVQQKEwZBbWF6b24xFDAS=EXAMPLE user-name@computer-name
   ```

1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/).
**Note**  
You can directly view and manage your CodeCommit credentials in **My Security Credentials**. For more information, see [View and manage your credentials](setting-up.md#setting-up-view-credentials).

1. In the IAM console, in the navigation pane, choose **Users**, and from the list of users, choose your IAM user. 

1. On the user details page, choose the **Security Credentials** tab, and then choose **Upload SSH public key**.

1. Paste the contents of your SSH public key into the field, and then choose **Upload SSH public key**. 

1. Copy or save the information in **SSH Key ID** (for example, *APKAEIBAERJR2EXAMPLE*).   
![\[The SSH Key ID in the IAM console\]](http://docs.aws.amazon.com/codecommit/latest/userguide/images/codecommit-ssh-key-id-iam.png)
**Note**  
If you have more than one SSH key IDs uploaded, the keys are listed alphabetically by key ID, not by upload date. Make sure that you have copied the key ID that is associated with the correct upload date.

1. In the Bash emulator, run the following commands to create a config file in the \$1/.ssh directory, or edit it if one already exists:

   ```
   notepad ~/.ssh/config
   ```

1. Add the following lines to the file, where the value for *User* is the SSH key ID you copied earlier, and the value for *IdentityFile* is the path to and name of the private key file:

   ```
   Host git-codecommit.*.amazonaws.com
     User APKAEIBAERJR2EXAMPLE
     IdentityFile ~/.ssh/codecommit_rsa
   ```
**Note**  
If you gave your private key file a name other than *codecommit\$1rsa*, be sure to use it here.  
You can set up SSH access to repositories in multiple Amazon Web Services accounts, For more information, see [Troubleshooting SSH connections to AWS CodeCommit](troubleshooting-ssh.md).

   Save the file as config (not config.txt), and then close Notepad.
**Important**  
The name of the file must be `config` with no file extension. Otherwise, the SSH connections fail.

1. Run the following command to test your SSH configuration:

   ```
   ssh git-codecommit.us-east-2.amazonaws.com
   ```

   You are asked to confirm the connection because `git-codecommit.us-east-2.amazonaws.com` is not yet included in your known hosts file. The CodeCommit server fingerprint is displayed as part of the verification (`a9:6d:03:ed:08:42:21:be:06:e1:e0:2a:d1:75:31:5e` for MD5 or `3lBlW2g5xn/NA2Ck6dyeJIrQOWvn7n8UEs56fG6ZIzQ` for SHA256).
**Note**  
CodeCommit server fingerprints are unique for every AWS Region. To view the server fingerprints for an AWS Region, see [Server fingerprints for CodeCommit](regions.md#regions-fingerprints).

   After you have confirmed the connection, you should see confirmation that you have added the server to your known hosts file and a successful connection message. If you do not see a success message, double-check that you saved the `config` file in the \$1/.ssh directory of the IAM user you configured for access to CodeCommit, that the `config` file has no file extension (for example, it must not be named config.txt), and that you specified the correct private key file (*codecommit\$1rsa*, not *codecommit\$1rsa*.pub). 

   To troubleshoot problems, run the `ssh` command with the `-v` parameter. For example:

   ```
   ssh -v git-codecommit.us-east-2.amazonaws.com
   ```

   For information to help you troubleshoot connection problems, see [Troubleshooting SSH connections to AWS CodeCommit](troubleshooting-ssh.md).

## Step 4: Connect to the CodeCommit console and clone the repository
<a name="setting-up-ssh-windows-connect-console"></a>

If an administrator has already sent you the name and connection details for the CodeCommit repository, you can skip this step and clone the repository directly.

**To connect to a CodeCommit repository**

1. Open the CodeCommit console at [https://console.aws.amazon.com/codesuite/codecommit/home](https://console.aws.amazon.com/codesuite/codecommit/home).

1. In the region selector, choose the AWS Region where the repository was created. Repositories are specific to an AWS Region. For more information, see [Regions and Git connection endpoints](regions.md).

1. Find the repository you want to connect to from the list and choose it. Choose **Clone URL**, and then choose the protocol you want to use when cloning or connecting to the repository. This copies the clone URL.
   + Copy the HTTPS URL if you are using either Git credentials with your IAM user or the credential helper included with the AWS CLI.
   + Copy the HTTPS (GRC) URL if you are using the **git-remote-codecommit** command on your local computer.
   + Copy the SSH URL if you are using an SSH public/private key pair with your IAM user.
**Note**  
 If you see a **Welcome** page instead of a list of repositories, there are no repositories associated with your AWS account in the AWS Region where you are signed in. To create a repository, see [Create an AWS CodeCommit repository](how-to-create-repository.md) or follow the steps in the [Getting started with Git and CodeCommit](getting-started.md) tutorial.

1. In the Bash emulator, run the **git clone** command with the SSH URL you copied to clone the repository. This command creates the local repo in a subdirectory of the directory where you run the command. For example, to clone a repository named *MyDemoRepo* to a local repo named *my-demo-repo* in the US East (Ohio) Region:

   ```
   git clone ssh://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo my-demo-repo
   ```

   Alternatively, open a command prompt, and using the URL and the SSH key ID for the public key you uploaded to IAM, run the **git clone** command. The local repo is created in a subdirectory of the directory where you run the command. For example, to clone a repository named *MyDemoRepo* to a local repo named *my-demo-repo*:

   ```
   git clone ssh://Your-SSH-Key-ID@git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo my-demo-repo
   ```

   For more information, see [Connect to the CodeCommit repository by cloning the repository](how-to-connect.md#how-to-connect-http) and [Create a commit](how-to-create-commit.md).

## Next steps
<a name="setting-up-ssh-windows-next-step"></a>

You have completed the prerequisites. Follow the steps in [Getting started with CodeCommit ](getting-started-cc.md) to start using CodeCommit.

# Setup steps for HTTPS connections to AWS CodeCommit repositories on Linux, macOS, or Unix with the AWS CLI credential helper
<a name="setting-up-https-unixes"></a>

Before you can connect to AWS CodeCommit for the first time, you must complete the initial configuration steps. For most users, this can be done most easily by following the steps in [For HTTPS users using Git credentials](setting-up-gc.md). However, if you want to connect to CodeCommit using a root account, federated access, or temporary credentials, you can use the credential helper that is included in the AWS CLI.

**Note**  
Although the credential helper is a supported method for connecting to CodeCommit using federated access, an identity provider, or temporary credentials, the recommended method is to install and use the **git-remote-codecommit** utility. For more information, see [Setup steps for HTTPS connections to AWS CodeCommit with git-remote-codecommit](setting-up-git-remote-codecommit.md).

**Topics**
+ [Step 1: Initial configuration for CodeCommit](#setting-up-https-unixes-account)
+ [Step 2: Install Git](#setting-up-https-unixes-install-git)
+ [Step 3: Set up the credential helper](#setting-up-https-unixes-credential-helper)
+ [Step 4: Connect to the CodeCommit console and clone the repository](#setting-up-https-unixes-connect-console)
+ [Next steps](#setting-up-https-unixes-next-step)

## Step 1: Initial configuration for CodeCommit
<a name="setting-up-https-unixes-account"></a>

Follow these steps to set up an Amazon Web Services account, create and configure an IAM user, and install the AWS CLI. 

**To create and configure an IAM user for accessing CodeCommit**

1. Create an Amazon Web Services account by going to [http://aws.amazon.com](http://aws.amazon.com) and choosing **Sign Up**.

1. Create an IAM user, or use an existing one, in your Amazon Web Services account. Make sure you have an access key ID and a secret access key associated with that IAM user. For more information, see [Creating an IAM User in Your Amazon Web Services account](https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_SettingUpUser.html).
**Note**  
CodeCommit requires AWS Key Management Service. If you are using an existing IAM user, make sure there are no policies attached to the user that expressly deny the AWS KMS actions required by CodeCommit. For more information, see [AWS KMS and encryption](encryption.md).

1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/).

1. In the IAM console, in the navigation pane, choose **Users**, and then choose the IAM user you want to configure for CodeCommit access.

1. On the **Permissions** tab, choose **Add Permissions**. 

1. In **Grant permissions**, choose **Attach existing policies directly**.

1. From the list of policies, select **AWSCodeCommitPowerUser** or another managed policy for CodeCommit access. For more information, see [AWS managed policies for CodeCommit](security-iam-awsmanpol.md).

   After you have selected the policy you want to attach, choose **Next: Review** to review the list of policies to attach to the IAM user. If the list is correct, choose **Add permissions**.

    For more information about CodeCommit managed policies and sharing access to repositories with other groups and users, see [Share a repository](how-to-share-repository.md) and [Authentication and access control for AWS CodeCommit](auth-and-access-control.md).

**To install and configure the AWS CLI**

1. On your local machine, download and install the AWS CLI. This is a prerequisite for interacting with CodeCommit from the command line. We recommend that you install AWS CLI version 2. It is the most recent major version of the AWS CLI and supports all of the latest features. It is the only version of the AWS CLI that supports using a root account, federated access, or temporary credentials with **git-remote-codecommit**.

   For more information, see [Getting Set Up with the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html).
**Note**  
CodeCommit works only with AWS CLI versions 1.7.38 and later. As a best practice, install or upgrade the AWS CLI to the latest version available. To determine which version of the AWS CLI you have installed, run the **aws --version** command.  
To upgrade an older version of the AWS CLI to the latest version, see [Installing the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/installing.html).

1. Run this command to verify that the CodeCommit commands for the AWS CLI are installed.

   ```
   aws codecommit help
   ```

   This command returns a list of CodeCommit commands.

1. Configure the AWS CLI with a profile by using the **configure** command, as follows:.

   ```
   aws configure
   ```

   When prompted, specify the AWS access key and AWS secret access key of the IAM user to use with CodeCommit. Also, be sure to specify the AWS Region where the repository exists, such as `us-east-2`. When prompted for the default output format, specify `json`. For example, if you are configuring a profile for an IAM user:

   ```
   AWS Access Key ID [None]: Type your IAM user AWS access key ID here, and then press Enter
   AWS Secret Access Key [None]: Type your IAM user AWS secret access key here, and then press Enter
   Default region name [None]: Type a supported region for CodeCommit here, and then press Enter
   Default output format [None]: Type json here, and then press Enter
   ```

   For more information about creating and configuring profiles to use with the AWS CLI, see the following:
   + [Named Profiles](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
   + [Using an IAM Role in the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html)
   + [Set command](https://docs.aws.amazon.com/cli/latest/reference/set.html)
   + [Connecting to AWS CodeCommit repositories with rotating credentials](temporary-access.md)

   To connect to a repository or a resource in another AWS Region, you must reconfigure the AWS CLI with the default Region name. Supported default Region names for CodeCommit include:
   + us-east-2
   + us-east-1
   + eu-west-1
   + us-west-2
   + ap-northeast-1
   + ap-southeast-1
   + ap-southeast-2
   + ap-southeast-3
   + me-central-1
   + eu-central-1
   + ap-northeast-2
   + sa-east-1
   + us-west-1
   + eu-west-2
   + ap-south-1
   + ap-south-1
   + ca-central-1
   + us-gov-west-1
   + us-gov-east-1
   + eu-north-1
   + ap-east-1
   + me-south-1
   + cn-north-1
   + cn-northwest-1
   + eu-south-1
   + ap-northeast-3
   + af-south-1
   + il-central-1

   For more information about CodeCommit and AWS Region, see [Regions and Git connection endpoints](regions.md). For more information about IAM, access keys, and secret keys, see [How Do I Get Credentials?](https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_Introduction.html#IAM_SecurityCredentials) and [Managing Access Keys for IAM Users](https://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html). For more information about the AWS CLI and profiles, see [Named Profiles](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html).

## Step 2: Install Git
<a name="setting-up-https-unixes-install-git"></a>

To work with files, commits, and other information in CodeCommit repositories, you must install Git on your local machine. CodeCommit supports Git versions 1.7.9 and later. Git version 2.28 supports configuring the branch name for initial commits. We recommend using a recent version of Git.

To install Git, we recommend websites such as [Git Downloads](http://git-scm.com/downloads).

**Note**  
Git is an evolving, regularly updated platform. Occasionally, a feature change might affect the way it works with CodeCommit. If you encounter issues with a specific version of Git and CodeCommit, review the information in [Troubleshooting](troubleshooting.md).

## Step 3: Set up the credential helper
<a name="setting-up-https-unixes-credential-helper"></a><a name="setting-up-https-unixes-ch-config"></a>

1. From the terminal, use Git to run **git config**, specifying the use of the Git credential helper with the AWS credential profile, and enabling the Git credential helper to send the path to repositories:

   ```
   git config --global credential.helper '!aws codecommit credential-helper $@'
   git config --global credential.UseHttpPath true
   ```
**Tip**  
The credential helper uses the default AWS credential profile or the Amazon EC2 instance role. You can specify a profile to use, such as `CodeCommitProfile`, if you have created an AWS credential profile to use with CodeCommit:   

   ```
   git config --global credential.helper '!aws --profile CodeCommitProfile codecommit credential-helper $@'    
   ```
If your profile name contains spaces, make sure you enclose the name in quotation marks (").  
You can configure profiles per repository instead of globally by using `--local` instead of `--global`.

   The Git credential helper writes the following value to `~/.gitconfig`:

   ```
   [credential]    
       helper = !aws --profile CodeCommitProfile codecommit credential-helper $@
       UseHttpPath = true
   ```
**Important**  
If you want to use a different IAM user on the same local machine for CodeCommit, you must run the **git config** command again and specify a different AWS credential profile.

1. Run **git config --global --edit** to verify the preceding value has been written to `~/.gitconfig`. If successful, you should see the preceding value (in addition to values that might already exist in the Git global configuration file). To exit, typically you would type **:q**, and then press Enter. 

   If you experience problems after you configure your credential helper, see [Troubleshooting](troubleshooting.md).
**Important**  
If you are using macOS, use the following steps to ensure the credential helper is configured correctly. 

1. If you are using macOS, use HTTPS to [connect to a CodeCommit repository](how-to-connect.md). After you connect to a CodeCommit repository with HTTPS for the first time, subsequent access fails after about 15 minutes. The default Git version on macOS uses the Keychain Access utility to store credentials. For security measures, the password generated for access to your CodeCommit repository is temporary, so the credentials stored in the keychain stop working after about 15 minutes. To prevent these expired credentials from being used, you must either:
   + Install a version of Git that does not use the keychain by default.
   + Configure the Keychain Access utility to not provide credentials for CodeCommit repositories.

   1. Open the Keychain Access utility. (You can use Finder to locate it.)

   1. Search for `git-codecommit.us-east-2.amazonaws.com`. Highlight the row, open the context menu or right-click it, and then choose **Get Info**.

   1. Choose the **Access Control** tab.

   1. In **Confirm before allowing access**, choose `git-credential-osxkeychain`, and then choose the minus sign to remove it from the list.
**Note**  
After you remove `git-credential-osxkeychain` from the list, you see a pop-up message whenever you run a Git command. Choose **Deny** to continue. If you find the pop-ups too disruptive, here are some other options:  
Connect to CodeCommit using SSH instead of HTTPS. For more information, see [For SSH connections on Linux, macOS, or Unix](setting-up-ssh-unixes.md). 
In the Keychain Access utility, on the **Access Control** tab for `git-codecommit.us-east-2.amazonaws.com`, choose the **Allow all applications to access this item (access to this item is not restricted)** option. This prevents the pop-ups, but the credentials eventually expire (on average, in about 15 minutes) and you see a 403 error message. When this happens, you must delete the keychain item to restore functionality.
For more information, see [Git for macOS: I configured the credential helper successfully, but now I am denied access to my repository (403)](troubleshooting-ch.md#troubleshooting-macoshttps).

## Step 4: Connect to the CodeCommit console and clone the repository
<a name="setting-up-https-unixes-connect-console"></a>

If an administrator has already sent you the name and connection details for the CodeCommit repository, you can skip this step and clone the repository directly.

**To connect to a CodeCommit repository**

1. Open the CodeCommit console at [https://console.aws.amazon.com/codesuite/codecommit/home](https://console.aws.amazon.com/codesuite/codecommit/home).

1. In the region selector, choose the AWS Region where the repository was created. Repositories are specific to an AWS Region. For more information, see [Regions and Git connection endpoints](regions.md).

1. Find the repository you want to connect to from the list and choose it. Choose **Clone URL**, and then choose the protocol you want to use when cloning or connecting to the repository. This copies the clone URL.
   + Copy the HTTPS URL if you are using either Git credentials with your IAM user or the credential helper included with the AWS CLI.
   + Copy the HTTPS (GRC) URL if you are using the **git-remote-codecommit** command on your local computer.
   + Copy the SSH URL if you are using an SSH public/private key pair with your IAM user.
**Note**  
 If you see a **Welcome** page instead of a list of repositories, there are no repositories associated with your AWS account in the AWS Region where you are signed in. To create a repository, see [Create an AWS CodeCommit repository](how-to-create-repository.md) or follow the steps in the [Getting started with Git and CodeCommit](getting-started.md) tutorial.

1. Open a terminal and run the **git clone** command with the HTTPS URL you copied. For example, to clone a repository named *MyDemoRepo* to a local repo named *my-demo-repo* in the US East (Ohio) Region:

   ```
   git clone https://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo my-demo-repo
   ```

## Next steps
<a name="setting-up-https-unixes-next-step"></a>

You have completed the prerequisites. Follow the steps in [Getting started with CodeCommit ](getting-started-cc.md) to start using CodeCommit.

# Setup steps for HTTPS connections to AWS CodeCommit repositories on Windows with the AWS CLI credential helper
<a name="setting-up-https-windows"></a>

Before you can connect to AWS CodeCommit for the first time, you must complete the initial configuration steps. For most users, this can be done most easily by following the steps in [For HTTPS users using Git credentials](setting-up-gc.md). However, if you want to connect to CodeCommit using a root account, federated access, or temporary credentials, you can use the credential helper that is included in the AWS CLI.

**Note**  
Although the credential helper is a supported method for connecting to CodeCommit using federated access, an identity provider, or temporary credentials, the recommended method is to install and use the **git-remote-codecommit** utility. For more information, see [Setup steps for HTTPS connections to AWS CodeCommit with git-remote-codecommit](setting-up-git-remote-codecommit.md).

This topic walks you through the steps to install the AWS CLI, set up your computer and AWS profile, connect to a CodeCommit repository, and clone that repository to your computer, also known as creating a local repo. If you're new to Git, you might also want to review the information in [Where can I learn more about Git?](welcome.md#welcome-get-started-with-git).

**Topics**
+ [Step 1: Initial configuration for CodeCommit](#setting-up-https-windows-account)
+ [Step 2: Install Git](#setting-up-https-windows-install-git)
+ [Step 3: Set up the credential helper](#setting-up-https-windows-credential-helper)
+ [Step 4: Connect to the CodeCommit console and clone the repository](#setting-up-https-windows-connect-console)
+ [Next steps](#setting-up-https-windows-next-step)

## Step 1: Initial configuration for CodeCommit
<a name="setting-up-https-windows-account"></a>

Follow these steps to set up an Amazon Web Services account, create and configure an IAM user, and install the AWS CLI. The AWS CLI includes a credential helper that you configure for HTTPS connections to your CodeCommit repositories. 

**To create and configure an IAM user for accessing CodeCommit**

1. Create an Amazon Web Services account by going to [http://aws.amazon.com](http://aws.amazon.com) and choosing **Sign Up**.

1. Create an IAM user, or use an existing one, in your Amazon Web Services account. Make sure you have an access key ID and a secret access key associated with that IAM user. For more information, see [Creating an IAM User in Your Amazon Web Services account](https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_SettingUpUser.html).
**Note**  
CodeCommit requires AWS Key Management Service. If you are using an existing IAM user, make sure there are no policies attached to the user that expressly deny the AWS KMS actions required by CodeCommit. For more information, see [AWS KMS and encryption](encryption.md).

1. Sign in to the AWS Management Console and open the IAM console at [https://console.aws.amazon.com/iam/](https://console.aws.amazon.com/iam/).

1. In the IAM console, in the navigation pane, choose **Users**, and then choose the IAM user you want to configure for CodeCommit access.

1. On the **Permissions** tab, choose **Add Permissions**. 

1. In **Grant permissions**, choose **Attach existing policies directly**.

1. From the list of policies, select **AWSCodeCommitPowerUser** or another managed policy for CodeCommit access. For more information, see [AWS managed policies for CodeCommit](security-iam-awsmanpol.md).

   After you have selected the policy you want to attach, choose **Next: Review** to review the list of policies to attach to the IAM user. If the list is correct, choose **Add permissions**.

    For more information about CodeCommit managed policies and sharing access to repositories with other groups and users, see [Share a repository](how-to-share-repository.md) and [Authentication and access control for AWS CodeCommit](auth-and-access-control.md).

**To install and configure the AWS CLI**

1. On your local machine, download and install the AWS CLI. This is a prerequisite for interacting with CodeCommit from the command line. We recommend that you install AWS CLI version 2. It is the most recent major version of the AWS CLI and supports all of the latest features. It is the only version of the AWS CLI that supports using a root account, federated access, or temporary credentials with **git-remote-codecommit**.

   For more information, see [Getting Set Up with the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html).
**Note**  
CodeCommit works only with AWS CLI versions 1.7.38 and later. As a best practice, install or upgrade the AWS CLI to the latest version available. To determine which version of the AWS CLI you have installed, run the **aws --version** command.  
To upgrade an older version of the AWS CLI to the latest version, see [Installing the AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/installing.html).

1. Run this command to verify that the CodeCommit commands for the AWS CLI are installed.

   ```
   aws codecommit help
   ```

   This command returns a list of CodeCommit commands.

1. Configure the AWS CLI with a profile by using the **configure** command, as follows:.

   ```
   aws configure
   ```

   When prompted, specify the AWS access key and AWS secret access key of the IAM user to use with CodeCommit. Also, be sure to specify the AWS Region where the repository exists, such as `us-east-2`. When prompted for the default output format, specify `json`. For example, if you are configuring a profile for an IAM user:

   ```
   AWS Access Key ID [None]: Type your IAM user AWS access key ID here, and then press Enter
   AWS Secret Access Key [None]: Type your IAM user AWS secret access key here, and then press Enter
   Default region name [None]: Type a supported region for CodeCommit here, and then press Enter
   Default output format [None]: Type json here, and then press Enter
   ```

   For more information about creating and configuring profiles to use with the AWS CLI, see the following:
   + [Named Profiles](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
   + [Using an IAM Role in the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html)
   + [Set command](https://docs.aws.amazon.com/cli/latest/reference/set.html)
   + [Connecting to AWS CodeCommit repositories with rotating credentials](temporary-access.md)

   To connect to a repository or a resource in another AWS Region, you must reconfigure the AWS CLI with the default Region name. Supported default Region names for CodeCommit include:
   + us-east-2
   + us-east-1
   + eu-west-1
   + us-west-2
   + ap-northeast-1
   + ap-southeast-1
   + ap-southeast-2
   + ap-southeast-3
   + me-central-1
   + eu-central-1
   + ap-northeast-2
   + sa-east-1
   + us-west-1
   + eu-west-2
   + ap-south-1
   + ap-south-1
   + ca-central-1
   + us-gov-west-1
   + us-gov-east-1
   + eu-north-1
   + ap-east-1
   + me-south-1
   + cn-north-1
   + cn-northwest-1
   + eu-south-1
   + ap-northeast-3
   + af-south-1
   + il-central-1

   For more information about CodeCommit and AWS Region, see [Regions and Git connection endpoints](regions.md). For more information about IAM, access keys, and secret keys, see [How Do I Get Credentials?](https://docs.aws.amazon.com/IAM/latest/UserGuide/IAM_Introduction.html#IAM_SecurityCredentials) and [Managing Access Keys for IAM Users](https://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html). For more information about the AWS CLI and profiles, see [Named Profiles](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html).

## Step 2: Install Git
<a name="setting-up-https-windows-install-git"></a>

To work with files, commits, and other information in CodeCommit repositories, you must install Git on your local machine. CodeCommit supports Git versions 1.7.9 and later. Git version 2.28 supports configuring the branch name for initial commits. We recommend using a recent version of Git.

To install Git, we recommend websites such as [Git for Windows](https://gitforwindows.org/). If you use this link to install Git, you can accept all of the installation default settings except for the following: 
+ When prompted during the **Adjusting your PATH environment** step, choose the option to use Git from the command line.
+ (Optional) If you intend to use HTTPS with the credential helper that is included in the AWS CLI instead of configuring Git credentials for CodeCommit, on the **Configuring extra options** page, make sure the **Enable Git Credential Manager** option is cleared. The Git Credential Manager is only compatible with CodeCommit if IAM users configure Git credentials. For more information, see [For HTTPS users using Git credentials](setting-up-gc.md) and [Git for Windows: I installed Git for Windows, but I am denied access to my repository (403)](troubleshooting-ch.md#troubleshooting-windowshttps).

**Note**  
Git is an evolving, regularly updated platform. Occasionally, a feature change might affect the way it works with CodeCommit. If you encounter issues with a specific version of Git and CodeCommit, review the information in [Troubleshooting](troubleshooting.md).

## Step 3: Set up the credential helper
<a name="setting-up-https-windows-credential-helper"></a>

The AWS CLI includes a Git credential helper you can use with CodeCommit. The Git credential helper requires an AWS credential profile, which stores a copy of an IAM user's AWS access key ID and AWS secret access key (along with a default AWS Region name and default output format). The Git credential helper uses this information to automatically authenticate with CodeCommit so you don't need to enter this information every time you use Git to interact with CodeCommit. <a name="setting-up-https-windows-ch-config"></a>

1. Open a command prompt and use Git to run **git config**, specifying the use of the Git credential helper with the AWS credential profile, which enables the Git credential helper to send the path to repositories:

   ```
   git config --global credential.helper "!aws codecommit credential-helper $@"
   git config --global credential.UseHttpPath true
   ```

   The Git credential helper writes the following to the .gitconfig file:

   ```
   [credential]    
       helper = !aws codecommit credential-helper $@ 
       UseHttpPath = true
   ```
**Important**  
If you are using a Bash emulator instead of the Windows command line, you must use single quotes instead of double quotes.
The credential helper uses the default AWS profile or the Amazon EC2 instance role. If you have created an AWS credential profile to use, such as *CodeCommitProfile*, you can modify the command as follows to use it instead:  
   

     ```
     git config --global credential.helper "!aws codecommit credential-helper --profile CodeCommitProfile $@"
     ```
This writes the following to the .gitconfig file:  
   

     ```
     [credential]    
         helper = !aws codecommit credential-helper --profile=CodeCommitProfile $@ 
         UseHttpPath = true
     ```
If your profile name contains spaces, you must edit your .gitconfig file after you run this command to enclose it in single quotation marks ('). Otherwise, the credential helper does not work. 
If your installation of Git for Windows included the Git Credential Manager utility, you see 403 errors or prompts to provide credentials into the Credential Manager utility after the first few connection attempts. The most reliable way to solve this problem is to uninstall and then reinstall Git for Windows without the option for the Git Credential Manager utility, because it is not compatible with CodeCommit. If you want to keep the Git Credential Manager utility, you must perform additional configuration steps to also use CodeCommit, including manually modifying the .gitconfig file to specify the use of the credential helper for AWS CodeCommit when connecting to CodeCommit. Remove any stored credentials from the Credential Manager utility (you can find this utility in Control Panel). After you have removed any stored credentials, add the following to your .gitconfig file, save it, and then try connecting again from a new command prompt window:  

     ```
     [credential "https://git-codecommit.us-east-2.amazonaws.com"]
         helper = !aws codecommit credential-helper $@ 
         UseHttpPath = true
     
     [credential "https://git-codecommit.us-east-1.amazonaws.com"]
         helper = !aws codecommit credential-helper $@ 
         UseHttpPath = true
     ```
You might also have to reconfigure your **git config** settings by specifying **--system** instead of **--global** or **--local** before all connections work as expected.
If you want to use different IAM users on the same local machine for CodeCommit, you should specify** git config --local** instead of **git config --global**, and run the configuration for each AWS credential profile. 

1. Run **git config --global --edit** to verify the preceding values have been written to the .gitconfig file for your user profile (by default, `%HOME%\.gitconfig` or `drive:\Users\UserName\.gitconfig`). If successful, you should see the preceding values (in addition to values that might already exist in the Git global configuration file). To exit, typically you would type **:q** and then press Enter.

## Step 4: Connect to the CodeCommit console and clone the repository
<a name="setting-up-https-windows-connect-console"></a>

If an administrator has already sent you the name and connection details for the CodeCommit repository, you can skip this step and clone the repository directly.

**To connect to a CodeCommit repository**

1. Open the CodeCommit console at [https://console.aws.amazon.com/codesuite/codecommit/home](https://console.aws.amazon.com/codesuite/codecommit/home).

1. In the region selector, choose the AWS Region where the repository was created. Repositories are specific to an AWS Region. For more information, see [Regions and Git connection endpoints](regions.md).

1. Find the repository you want to connect to from the list and choose it. Choose **Clone URL**, and then choose the protocol you want to use when cloning or connecting to the repository. This copies the clone URL.
   + Copy the HTTPS URL if you are using either Git credentials with your IAM user or the credential helper included with the AWS CLI.
   + Copy the HTTPS (GRC) URL if you are using the **git-remote-codecommit** command on your local computer.
   + Copy the SSH URL if you are using an SSH public/private key pair with your IAM user.
**Note**  
 If you see a **Welcome** page instead of a list of repositories, there are no repositories associated with your AWS account in the AWS Region where you are signed in. To create a repository, see [Create an AWS CodeCommit repository](how-to-create-repository.md) or follow the steps in the [Getting started with Git and CodeCommit](getting-started.md) tutorial.

1. Open a command prompt and run the **git clone** command with the HTTPS URL you copied. The local repo is created in a subdirectory of the directory where you run the command. For example, to clone a repository named *MyDemoRepo* to a local repo named *my-demo-repo* in the US East (Ohio) Region:

   ```
   git clone https://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo my-demo-repo
   ```

   On some versions of Windows, you might see a pop-up message asking for your user name and password. This is the built-in credential management system for Windows, but it is not compatible with the credential helper for AWS CodeCommit. Choose **Cancel**. 

   

## Next steps
<a name="setting-up-https-windows-next-step"></a>

You have completed the prerequisites. Follow the steps in [Getting started with CodeCommit ](getting-started-cc.md) to start using CodeCommit.