用git下载partner提供的private repo时,提示需要输入username和password。但怎么输入都报Authentication failed 的错误。
报错log:
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for ‘https://github.com/xxx/xxx’
于是求得方法:https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token文章来源:https://www.toymoban.com/news/detail-788101.html
本文根据上述链接整理出步骤:文章来源地址https://www.toymoban.com/news/detail-788101.html
- 拿到你的token。打开github,进入settings,再进入developer settings
- 找到这个personal access tokens,点击Generate new token,随便取个note名字然后把repo的操作权限勾上:
点击生成以后,就得到一串token,这串token就是你的临时密码了~
- 最后只需:
git clone https://github.com/username/repo.git
Username: your_username
Password: your_token
到了这里,关于【已解决】Git下载私有仓库时报错Authentication failed的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!