-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Description
Hi there,
Current Behavior:
npm@7 install from https://github with PAT resolved as git+ssh://. Is this intended?
pacakge.json
"foo": "git+https://github.com/bar/baz.git",
package-lock.json
...
"resolved": "git+ssh://[email protected]/bar/baz.git#..."
...
Expected Behavior:
package-lock.json
...
"resolved": "git+https://github.com/bar/baz.git#..."
...
It's because I have some hacks to keep the PAT a secret. like:
git config --global url."https://${GITHUB_TOKEN}@github.com".insteadOf "https://github.com"
This hack worked in npm@6, but npm@7 didn't.
Steps To Reproduce:
1. Create a private repository of npm on GitHub
2. npm install above 1 with PAT.
3. npm ci on another env with above GITHUB_TOKEN hack. #=> error
Environment:
- OS: macOS 11.2
- Node: 14.15.4
- npm: 7.5.2
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release