更新时间:2022-04-08 05:17:49
可以通过 https 和 oauth 或 ssh.
It can be done via https and oauth or ssh.
https 和 oauth: 创建一个访问令牌,它具有repo"范围和然后使用这个语法:
https and oauth: create an access token that has "repo" scope and then use this syntax:
"package-name": "git+https://<github_token>:x-oauth-basic@github.com/<user>/<repo>.git"
或
ssh: 设置 ssh 然后使用以下语法:
ssh: setup ssh and then use this syntax:
"package-name": "git+ssh://git@github.com:<user>/<repo>.git"
(注意在用户前使用冒号而不是斜线)
(note the use of colon instead of slash before user)