git执行push操作时报错:remote: xxx: Incorrect username or password (access token)

问题:

最近用git push项目到gitee时报错,提示信息如下:

remote: xxx: Incorrect username or password (access token)
fatal: Authentication failed for 'https://gitee.com/xxx/xxx.git/'

想了一下,原来是几天前我把gitee的密码给改了,所以原先git存留的密码就失效了

解决方案

  1. 清空git存留的用户名和密码:
git config --system --unset credential.helper
  1. 重新push,按照提示输入用户名和密码即可

<

  1. 执行以下命令,后续再push的时候就不用输入用户名和密码了
git config --global credential.helper store
posted @ 2023-04-21 12:16  junlin623  阅读(197)  评论(0编辑  收藏  举报