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.
Hi @scotttball,
Is it possible to share your appId?
Hi @scotttball,
Is it possible to share your appId?
App Id: dnv3f4j5dx5cz
Two things I wanted to check here:
(1) Is it possible to move the NPM package to a public repo?
(2) Have you looked at this: https://docs.npmjs.com/using-private-packages-in-a-ci-cd-workflow
Amplify wouldn't explicitly have access to the private NPM repo.
@ganipcanot
(1) Is it possible to move the NPM package to a public repo?
No, I don't believe so.
(2) Have you looked at this: https://docs.npmjs.com/using-private-packages-in-a-ci-cd-workflow
Yes, I have. Sadly, we can't move to private registries at this point in time.
The only path was to use private git repos for npm packages (which although I know is unorthodox), it's my companies decision to do it like this.
@ganipcanot do you want to keep this open or should I mark this a non-issue since it doesn't seem like amplify supports it?
@scotttball I'll mark it as a "feature request" for now and can discuss with the team internally if this is something we want to support in the future.
We have a similar setup in my company as well. Amplify console has read access to a private repo. Would be nice if Amplify console pulls the package from GitHub.
In case anyone else has the same problem, you can workaround it as explained here.
Most helpful comment
@scotttball I'll mark it as a "feature request" for now and can discuss with the team internally if this is something we want to support in the future.