AWS CodeCommit
User Guide (API Version 2015-04-13)

Troubleshooting Access Errors and AWS CodeCommit

The following information might help you troubleshoot access errors when connecting with AWS CodeCommit repositories.

Access error: I am prompted for a user name and password when I connect to a CodeCommit repository from Windows

Problem: When you try to use Git to communicate with a CodeCommit repository, you see a dialog box that prompts you for your user name and password.

Possible fixes: This might be the built-in credential management system for Windows. Depending on your configuration, do one of the following:

Access error: Public key denied when connecting to a CodeCommit repository

Problem: When you try to use an SSH endpoint to communicate with a CodeCommit repository, an error message appears containing the phrase Error: public key denied.

Possible fixes: The most common reason for this error is that you have not completed setup for SSH connections. Configure a public and private SSH key pair, and then associate the public key with your IAM user. For more information about configuring SSH, see For SSH Connections on Linux, macOS, or Unix and For SSH Connections on Windows.

Access error: “Rate Exceeded” or “429” message when connecting to a CodeCommit repository

Problem: When you try to communicate with a CodeCommit repository, a message appears that says “Rate Exceeded” or with an error code of “429”. Communication either slows significantly or fails.

Cause: All calls to CodeCommit, whether from an application, the AWS CLI, a Git client, or the AWS Management Console, are subject to a maximum number of requests per second and overall active requests. You cannot exceed the maximum allowed request rate for an AWS account in any AWS Region. If requests exceed the maximum rate, you receive an error and further calls are temporarily throttled for your AWS account. During the throttling period, your connections to CodeCommit are slowed and might fail.

Possible fixes: Take steps to reduce the number of connections or calls to CodeCommit or to spread out requests. Some approaches to consider:

  • Implement jitter in requests, particularly in periodic polling requests

    If you have an application that is polling CodeCommit periodically and this application is running on multiple Amazon EC2 instances, introduce jitter (a random amount of delay) so that different Amazon EC2 instances do not poll at the same second. We recommend a random number from 0 to 59 seconds to evenly distribute polling mechanisms across a one-minute timeframe.

  • Use an event-based architecture rather than polling

    Rather than polling, use an event-based architecture so that calls are only made when an event occurs. Consider using CloudWatch Events notifications for AWS CodeCommit events to trigger your workflow.

  • Implement error retries and exponential backoffs for APIs and automated Git actions

    Error retries and exponential backoffs can help limit the rate of calls. Each AWS SDK impements automatic retry logic and exponential backoff alorithms. For automated Git push and Git pull, you might need to implement your own retry logic. For more information, see Error Retries and Exponential Backoff in AWS.

  • Request a CodeCommit service limit increase in the AWS Support Center

    To receive a service limit increase, you must confirm that you have already followed the suggestions offered here, including implementation of error retries or exponential backoff methods. In your request, you must also provide the AWS Region, AWS account, and timeframe affected by the throttling issues.