0
点赞
收藏
分享

微信扫一扫

【已解决】Git下载私有仓库时报错Authentication failed

快乐码农Alan007 2022-09-18 阅读 109
gitgithub

用git下载partner提供的private repo时,提示需要输入username和password。但怎么输入都报Authentication failed 的错误。
报错log:

于是求得方法:https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

本文根据上述链接整理出步骤:

  1. 拿到你的token。打开github,进入settings,再进入developer settings
    在这里插入图片描述
  2. 找到这个personal access tokens,点击Generate new token,随便取个note名字然后把repo的操作权限勾上:
    在这里插入图片描述
    点击生成以后,就得到一串token,这串token就是你的临时密码了~
    在这里插入图片描述
  3. 最后只需:
git clone https://github.com/username/repo.git
Username: your_username
Password: your_token
举报

相关推荐

0 条评论