在脚本中,我尝试使用 OAuth 令牌克隆 GitHub 存储库。
根据本教程:
https://github.com/blog/1270-easier-builds-and-deployments-using-git-over-https-and-oauth https://github.com/blog/1270-easier-builds-and-deployments-using-git-over-https-and-oauth
我应该能够为它构建一个命令,如下所示:
git clone https://<token>@github.com/owner/repo.git
如果我使用正确的访问令牌手动尝试此操作,它仍然会要求我输入密码。
如果我在命令行上尝试它,我只会得到一个repository not found
error.
这篇文章是 2012 年的,我找不到任何相关的 API 文档。所以我想知道这是否仍然有效。
只需使用 HTTPS 地址以用户身份使用密钥进行克隆即可,因此:
git clone https://[email protected] /cdn-cgi/l/email-protection/username/repo.git
or
git clone https://username:[email protected] /cdn-cgi/l/email-protection/username/repo.git
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)