-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Fails to install npm packages from private github repos in docker since v6.11.0 #950
Comments
Does it work when you run the git commands directly, not through npm? Can you try executing What is the user account that this is running as? Is it possible that the If the first command works fine, but the user running all this is |
Like you said, the user running Shouldn't running |
When npm is running as This prevents doing a When you placed the config file at |
Even in both locations it still fails. Interestingly, without a |
In a similar situation, I haven't looked into how npm does it's inference/user switching, but it seems it fails to set the home directory of the user it switches to. If you run Running |
I am experiencing a similar issue related to the .ssh/known_hosts file. I believe it has the same root cause. It works fine for us on windows/macos hosts, but fails on linux hosts, starting with npm 6.11.0 (in docker containers) during Copying known_hosts (and our ssh deploy key) to the node user's .ssh folder (with appropriate permissions) and re-running Also, similarly to the above comment, Tested on the node:10.16.3-stretch and node:14.4.0-stretch docker images (with npm 6.11.0 and 6.14.5). It would be nice to have a way to override the user inference behavior. |
npm If your bug is preproducible on If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo Closing: This is an automated message. |
Sorry to necro this but a specific google search leads to here. (I know for a fact haha) I just wanted to share my fix in case it can help anyone. I had So make sure that you run your container as To the devs: can this be that npm install in the node docker image assumes the ssh configs will be in that exact path and doesn't look it up in the current userspace? |
@kgagnon You saved my life bro ! It worked like a charm ! ❤️ |
What / Why / When
npm fails to install npm packages from private github repositories in docker since v6.11.0
Where
packages from private github repositories in docker
How
Current Behavior
Steps to Reproduce
Install an npm package from a private git repository you have access to (eg.
npm i git+https://github.com/user/private-repo
)Write up a simple docker file like...
run
docker build . --build-arg NPM_VERSION=6.13.6 --build-arg GITHUB_READ_TOKEN=***
Expected Behavior
docker build succeeds like it does for
docker build . --build-arg NPM_VERSION=6.10.0 --build-arg GITHUB_READ_TOKEN=***
The text was updated successfully, but these errors were encountered: