Amplify-console: Permission denied when trying to build and pulling a npm package from a private Github repo

Created on 18 Jul 2020  路  8Comments  路  Source: aws-amplify/amplify-console

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.
feature request

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.

All 8 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nomiddlename picture nomiddlename  路  4Comments

JIoJIaJIu picture JIoJIaJIu  路  5Comments

gherrera-gesintel picture gherrera-gesintel  路  4Comments

AustinZhu picture AustinZhu  路  4Comments

OzzieOrca picture OzzieOrca  路  3Comments