Troubleshooting console errors and Amazon CodeCommit - Amazon CodeCommit
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Troubleshooting console errors and Amazon CodeCommit

The following information might help you troubleshoot console errors when using Amazon CodeCommit repositories.

Access error: Encryption key access denied for a CodeCommit repository from the console or Amazon CLI

Problem: When you try to access CodeCommit from the console or the Amazon CLI, an error message appears containing the phrase EncryptionKeyAccessDeniedException or User is not authorized for the KMS default key for CodeCommit 'aws/codecommit' in your account.

Possible fixes: The most common cause for this error is that your Amazon Web Services account is not subscribed to Amazon Key Management Service, which is required for CodeCommit. Open the Amazon KMS console, choose Amazon managed keys, and then choose Get Started Now. If you see a message that you are not currently subscribed to the Amazon Key Management Service service, follow the instructions on that page to subscribe. For more information about CodeCommit and Amazon Key Management Service, see Amazon KMS and encryption.

Encryption error: Repository can't be decrypted

Problem: When you try to access a CodeCommit repository from the console or the Amazon CLI, an error message appears containing the phrase Repository can't be decrypted.

Possible fixes: The most common cause for this error is that the Amazon KMS key used to encrypt and decrypt data for this repository is not active or pending deletion. An active Amazon managed key or customer managed key in Amazon Key Management Serviceis required for CodeCommit. Open the Amazon KMS console, choose Amazon managed keys or Customer managed keys, and make sure that the key used for the repository is present in the Amazon Web Services Region where the repository exists and that its state is Active. For more information about CodeCommit and Amazon Key Management Service, see Amazon KMS and encryption.

Important

If the key that was used to encrypt and decrypt the data for the repository has been permanently deleted or is otherwise inaccessible, data in the repositories encrypted with that key cannot be accessed.

Console error: Cannot browse the code in a CodeCommit repository from the console

Problem: When you try to browse the contents of a repository from the console, an error message appears denying access.

Possible fixes: The most common cause for this error is that an IAM policy applied to your Amazon Web Services account denies one or more of the permissions required for browsing code from the CodeCommit console. For more information about CodeCommit access permissions and browsing, see Authentication and access control for Amazon CodeCommit.

Display error: Cannot view a file or a comparison between files

Problem: When you try to view a file or a comparison between two versions of a file in the CodeCommit console, an error appears stating that the file or difference is too large to display.

Possible fixes: The most common cause for this error is that either the file is too large to display, contains one or more lines that exceeds the character limit for a single line in a file, or that the difference between the two versions of the file exceeds the line limit. For more information, see Quotas. To view the file or the differences between the version of the file, you can open the file locally in your preferred IDE, use a Git diff tool, or run the git diff command.