- Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Bugthing that needs fixingthing that needs fixingRelease 6.xwork is associated with a specific npm 6 releasework is associated with a specific npm 6 release
Description
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
npm ERR! Error while executing: npm ERR! /usr/bin/git ls-remote -h -t https://github.com/user/private-repo npm ERR! npm ERR! remote: Password authentication is not available for Git operations. npm ERR! remote: You must use a personal access token or SSH key. npm ERR! remote: See https://github.com/settings/tokens or https://github.com/settings/ssh npm ERR! fatal: unable to access 'https://github.com/user/private-repo': The requested URL returned error: 403 npm ERR! npm ERR! exited with error code: 128 npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-02-19T02_07_01_401Z-debug.log
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...
FROM node:12.16.0-alpine WORKDIR /home/node ARG GITHUB_READ_TOKEN ARG NPM_VERSION COPY package.json package-lock.json ./ RUN npm install -g npm@$NPM_VERSION && \ apk add --no-cache --virtual temp-build-deps git && \ echo -e "machine github.com\n login $GITHUB_READ_TOKEN" > ~/.netrc && \ npm install && \ apk del temp-build-deps && \ rm ~/.netrc COPY . . ENTRYPOINT ["npm", "test"]
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=***
exoer, yuiseki and wongjiahau
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingRelease 6.xwork is associated with a specific npm 6 releasework is associated with a specific npm 6 release