BUG解决:fatal: Authentication failed for ‘https://github.com/xxx/xxx/‘

项目场景:

进行git push时同步github库,输入用户名和密码之后出现


问题描述

遇到fatal: Authentication failed for 'https://github.com/xxx/xxx/'报错,
fatal: Authentication failed for 'https://github.com/xxx/xxx/'

详细报错如下

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/'

试过git config还是不行


原因分析:

刚开始看到可能会很懵,但仔细看报错信息

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.

翻译过来就是2021年8月31号之后就移除了密码授权,而进入后面给出的网站查看之后就会发现:
总结起来就是密码处要填入你的personal access token
总结起来就是密码处要填入你的personal access token


解决方案:

  1. 点击github头像,再点击settings
    在这里插入图片描述
  2. 滑到最下面找到developer settings
     滑到最下面找到developer settings
  3. 点击生成personal access token(这里记得把权限全选,然后把token保存在一个文本文档里,因为是没法第2次查看的

![点击生成personal access token](https://img-blog.csdnimg.cn/4046a4a5b752470e8c2a673a3659ff88.png

  1. 然后再进行git push时在密码处复制粘贴自己的token就成功了
    在这里插入图片描述

更多学习干货与资料领取欢迎关注公众号:洋芋智能

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

和洋芋讲科技

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值