自学内容网 自学内容网

git clone 私有仓库时出现错误 Authentication failed for :xxxxxx

错误信息

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/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.git/'

在出现这个问题之前,会先让你填写username and password,当你正常输入时,才会出现以上的问题。

解决方案

  1. 在github中进入setting界面
    在这里插入图片描述

  2. 找到最下面的一个设置项
    在这里插入图片描述

  3. 我用的是最后一个Tokens来生成

在这里插入图片描述

生成token的细节就不描述了,这个token要自己存好,生成token下面可以设置这个token的权限,如果忘记了的话就需要重新来这里生成了。

  1. 最后一步,重新git clone你的私有仓库,输入username, password填入上面生成的token,问题解决

原文地址:https://blog.csdn.net/weixin_42035397/article/details/142738395

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!