Skip to content

Commit 2eca24b

Browse files
authored
fix: use git+https protocol for repo url (#441)
1 parent 21c9262 commit 2eca24b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/util/git.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const getRemoteUrl = async (path, remote) => {
2323
try {
2424
const urlStr = await tryGit(path, 'remote', 'get-url', remote)
2525
const { domain, user, project } = hgi.fromUrl(urlStr)
26-
const url = new URL(`https://${domain}`)
26+
const url = new URL(`git+https://${domain}`)
2727
url.pathname = `/${user}/${project}.git`
2828
return url.toString()
2929
} catch {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"repository": {
2626
"type": "git",
27-
"url": "https://github.com/npm/template-oss.git"
27+
"url": "git+https://github.com/npm/template-oss.git"
2828
},
2929
"keywords": [
3030
"npm",

workspace/test-workspace/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"repository": {
2222
"type": "git",
23-
"url": "https://github.com/npm/template-oss.git",
23+
"url": "git+https://github.com/npm/template-oss.git",
2424
"directory": "workspace/test-workspace"
2525
},
2626
"keywords": [],

0 commit comments

Comments
 (0)