mirror of
https://github.com/zhigang1992/npm.git
synced 2026-04-29 04:25:30 +08:00
change git: to https:
This commit is contained in:
3
lib/cache/add-remote-git.js
vendored
3
lib/cache/add-remote-git.js
vendored
@@ -47,7 +47,8 @@ module.exports = function addRemoteGit (u, parsed, silent, cb_) {
|
||||
// If the path is like ssh://foo:some/path then it works, but
|
||||
// only if you remove the ssh://
|
||||
var origUrl = u
|
||||
u = u.replace(/^git\+/, "")
|
||||
u = u.replace(/^git:/, "https:")
|
||||
.replace(/^git\+/, "")
|
||||
.replace(/#.*$/, "")
|
||||
|
||||
// ssh paths that are scp-style urls don't need the ssh://
|
||||
|
||||
Reference in New Issue
Block a user