Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (19.1k points)

I am running a CodeBuild on a project that has private requirements stored in CodeCommit.

I need to add a command in buildspec.yml that loads the https git credentials so git clone works when CodeBuild runs pip install.

The build fails with fatal: could not read Username for '': No such device or address

1 Answer

0 votes
by (44.4k points)

Since the CodeBuild environment uses an IAM role for credentials (not a username and password), you will need to configure the CodeCommit credential helper in your buildspec:




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

      - git config --global credential.UseHttpPath true

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

Browse Categories