aws-amplify / aws-amplify/amplify-hosting

Permission denied when trying to build and pulling a npm package from a private Github repo

Open
#869 8 comments 2 reactions 0 assignees View on GitHub
feature-request
Dominant language
Dockerfile
Stars
481
Forks
123
PR merge metrics
No merged PRs in 30d

Description

**App Id**: private
**Region**: us-west-2
**Step**: Build
**Status**:

**Issue/question**
When trying to deploy a static react application, AWS amplify is failing on the build step because it cannot access a private repository (that is used for a npm package host). Is there some way to bypass this?

The Github account that is used for pulling has access to this private org.

**Error message**
```
2020-07-15T23:48:20.590Z [WARNING]: error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads git@************
Directory: /codebuild/output/********
Output:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
```

Contributor guide

Open the contributing guide

Research direction

Start with the AWS Amplify build step and the logged `git ls-remote` command, focusing on the `Permission denied (publickey)` result for the private GitHub dependency. Review the repository's build configuration and existing guidance for private package access. Done means the React application can resolve the private npm package during deployment without the SSH permission failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, git, github, react
Domain
authentication, build-system, ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.