Add a Git-based Repository to Amazon EMR - Amazon EMR

Add a Git-based Repository to Amazon EMR

To add a Git-based repository as a resource in your Amazon EMR account

  1. Open the Amazon EMR console at https://console.aws.amazon.com/elasticmapreduce/.

  2. Choose Git repositories, and then choose Add repository.

  3. For Repository name, enter a name to use for the repository in Amazon EMR.

    Names may only contain alphanumeric characters, hyphens (-), or underscores (_).

  4. For Git repository URL, enter the URL for the repository. When using a CodeCommit repository, this is the URL that is copied when you choose Clone URL and then Clone HTTPS, for example, https://git-codecommit.us-west-2.amazonaws.com/v1/repos/MyCodeCommitRepoName.

  5. For Branch, enter a branch name.

  6. For Git credentials, choose options according to the following guidelines. You can use a Git user name and password or a personal access token (PAT) to authenticate to your repository. EMR Notebooks accesses your Git credentials using secrets stored in Secrets Manager.

    Option Description

    Use an existing AWS secret

    Choose this option if you already saved your credentials as a secret in Secrets Manager, and then select the secret name from the list.

    If you select a secret associated with a Git user name and password, the secret must be in the format {"gitUsername": MyUserName, "gitPassword": MyPassword}.

    Create a new secret

    Choose this option to associate existing Git credentials with a new secret that you create in Secrets Manager. Do one of the following based on the Git credentials that you use for the repository.

    If use a Git user name and password to access the repository, select Username and password, enter the Secret name to use in Secrets Manager, and then enter the Username and Password to associate with the secret.

    –OR–

    If you use a personal access token to access the repository, select Personal access token (PAT), enter the Secret name to use in Secrets Manager, and then enter your personal access token. For more information, see Creating a personal access token for the command line for GitHub and Personal access tokens for Bitbucket. CodeCommit repositories do not support this option.

    Use a public repository without credentials

    Choose this option to access a public repository.

  7. Choose Add repository.