[ aws . codecommit ]

credential-helper

Description

Provide a SigV4 compatible user name and password for git smart HTTP These commands are consumed by git and should not used directly. Erase and Store are no-ops. Get is operation to generate credentials to authenticate AWS CodeCommit. Run “aws codecommit credential-helper help” for details

Synopsis

aws codecommit credential-helper

Options

None

Available Commands

Examples

Note

To use the following examples, you must have the AWS CLI installed and configured. See the Getting started guide in the AWS CLI User Guide for more information.

Unless otherwise stated, all examples have unix-like quotation rules. These examples will need to be adapted to your terminal’s quoting rules. See Using quotation marks with strings in the AWS CLI User Guide .

To set up the credential helper included in the AWS CLI with AWS CodeCommit

The credential-helper utility is not designed to be called directly from the AWS CLI. Instead it is intended to be used as a parameter with the git config command to set up your local computer. It enables 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.

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

Output:

[credential]
    helper = !aws codecommit credential-helper $@
    UseHttpPath = true

For more information, see Setting up for AWS CodeCommit Using Other Methods in the AWS CodeCommit User Guide. Review the content carefully, and then follow the procedures in one of the following topics: For HTTPS Connections on Linux, macOS, or Unix or For HTTPS Connections on Windows in the AWS CodeCommit User Guide.