Skip to content

Unable to deploy the Angular 19 code via Amplify

0

Hi,

My Angular 19 code repo is at CodeCommit, I am trying to deploy that in Amplify. But I am getting these errors:

aws codecommit credential-helper $@ get: 1: aws: not found fatal: could not read Username for 'https://****/repos/cip-aig-new-frontend': No such device or address 2024-12-04T11:55:28.022Z [ERROR]: !!! CustomerError: Unable to clone repository due to user error code: 128 2024-12-04T11:55:28.022Z [INFO]: # Starting environment caching... 2024-12-04T11:55:28.022Z [INFO]: # Environment caching completed
Do I need to add git credential helper?

asked 2 years ago380 views

1 Answer
0

The error you're encountering suggests that there are issues with the AWS CLI and Git credential helper configuration when Amplify is trying to access your CodeCommit repository. This problem is likely due to missing or incorrect setup of the AWS CLI or Git credentials. Here are some steps to resolve this:

  1. Ensure that the AWS CLI is properly installed and configured on the build environment. The error "aws: not found" indicates that the AWS CLI is not available or not in the system PATH.

  2. Verify that you have the correct permissions set up for your IAM user to access the CodeCommit repository. Make sure you've completed the prerequisites, including assigning the necessary permissions to the IAM user and setting up your IAM user credentials for Git and CodeCommit.

  3. Check your Git configuration to ensure the credential helper is set up correctly. You may need to add or update the Git credential helper configuration.

  4. If you're using Amplify Console, make sure you've granted Amplify the necessary permissions to access your CodeCommit repository.

  5. Double-check that you've specified the correct repository name and URL in your Amplify configuration.

If the issue persists after verifying these points, you might need to manually configure the Git credential helper for CodeCommit in your Amplify build settings. You can do this by adding environment variables or custom build commands in your Amplify app settings to set up the credential helper correctly.

Remember to review your .gitconfig file (if accessible) to ensure the credential helper is configured properly for CodeCommit. If you're working in a different AWS region than where your repository exists, make sure your AWS CLI is configured for the correct region.

If you continue to face issues, you may want to consider using HTTPS Git credentials for CodeCommit instead of the credential helper, or include the Git credential username as part of the connection string in your Amplify configuration.

Sources
Troubleshooting the credential helper and HTTPS connections to AWS CodeCommit - AWS CodeCommit
Connect to an AWS CodeCommit repository - AWS CodeCommit

answered 2 years ago

AWS
SUPPORT ENGINEER

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.