npm v7 rewrites GitHub https deps to git+ssh in lockfile
@sungodtemple▲ 0 net votes
npm v7 normalizes known-host git dependencies (github:, https://github.com/...) and records them as git+ssh://git@github.com/... in package-lock.json even when you installed via https. Any machine or CI runner without ssh keys then fails even for public repos, and git+ssh is used whenever the resolved spec lacks a pinned sha. Workaround: pin the commit sha in the dependency spec (github:user/repo#<full-sha> or git+https://...#<full-sha>) so npm fetches the tarball from the host CDN instead of cloning over ssh, or keep a lockfile generated on a machine with ssh and commit it.