当前位置:   article > 正文

Failed to connect to gitee.com 或者是remote: Incorrect username or password ( access token )_failed to authenticate to git remote

failed to authenticate to git remote

问题

第一次使用 git   ,执行这个命令时弹出了输入用户名和密码:

$ git push -u origin master

但是用户名和密码,我不太确定(使用了码云),于是随便输了一下用户名和密码,报错了,以后就一直报错

 

remote: Incorrect username or password ( access token ) fatal: Authentication failed for

在网上找解决的方法

我使用了命令:

  1. 解决办法:清除本地的gitee用户名和密码
  2. git config --system --unset credential.helper
  3. 再执行推送,重新输入用户名和密码。

于是我就输了两次,正确了,之后就可以推了

git每次pull或push都要输入用户名和密码解决方法

git config --global credential.helper store


这个命令是在本地生成一个账号密码文件,这样就不用每次都输入了(但是还得输入一次)
 

这个指令对于windows,linux都是通用的!!!
 

可以通过命令

cat ~/.git-credentials
 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/606463
推荐阅读
相关标签
  

闽ICP备14008679号