Git报错fatal:Authentication failed for‘https://git……解决方法

报错就是因为你输入的账号或者密码错误,导致验证失败。

方法一配置全局参数:

git config --global user.name “xxx”
git config --global user.email “xxx”

方法二:

git remote -v
git remote remove origin
git remote add origin xxx

方法三(可以解决):

git config --system --unset credential.helper

执行这个命令之后,你可以重新写入账号密码,这样就可以重新提交代码了。

这个错误是由于GitHub在2021年8月13日移除了对密码身份验证的支持所导致的。现在推荐使用个人访问令牌(Personal Access Token)进行身份验证。你可以在GitHub的文档中找到关于使用HTTPS URL进行克隆的更多信息,链接为https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls。在克隆时,你需要使用个人访问令牌来进行身份验证,而不是密码。你可以在https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/找到更多关于令牌身份验证的信息。所以,你需要生成一个个人访问令牌,并将其用作身份验证凭据来解决这个问题。 #### 引用[.reference_title] - *1* [fatal: Authentication failed for ‘https://github.com](https://blog.csdn.net/u010751974/article/details/126542823)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [fatal: Authentication failed for ‘https://github.com/xxx.git/‘](https://blog.csdn.net/Blog_Sun/article/details/120038526)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [解决报错fatal: Authentication failed for ‘https://github.com/*/*.git/‘](https://blog.csdn.net/liuzehn/article/details/128037853)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

codernmx

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

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

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

打赏作者

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

抵扣说明:

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

余额充值