Report this

What is the reason for this report?

Install package from private GitHub repository with yarn - App Platform static site build fails - permission denied

Posted on March 12, 2021

Hi, my site has a dependency which is a private GitHub repository like this:

In package.json:
...
"dependencies": {
  "library": "myusername/library",
  ...
},
...

I’ve authorized Digital Ocean to access all my repositories but during the build, the library package cannot be retrieved, erroring with:

git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights

What I’ve tried:


What is the correct way of adding this library package dependency such that it can be fetched during build?

I’d really appreciate any help.

Thank!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.