Allow private git repos for npm
Ralph Landon
Allow adding packages from private git repos in package.json
{"somemodule": "git+ssh://path/to/repo"}
Log In
S
Sandeep Acharya
Set the following as the build command
git config --global url."https://${GITHUB_TOKEN}@github.com/".insteadOf ssh://git@github.com; npm install; npm run build
and set
GITHUB_TOKEN
in the environment variableA
Alec Larson
In the meantime, you can use this tool:
A
Alec Larson
I have this for my "Build Command" setting:
npm i -g git-ssh-key@1.1.0; git-ssh-key setup; npm i; npm run build
and
GIT_SSH_KEY_BITBUCKET
in my environment with a base64-encoded private key as its value.P
Paul P
This doesn't work for Static websites that deploy Node SPAs.
The
npm i
command is done internally by Render and cannot be overridden by Build Command setting.