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

发布时间 2023-04-21 12:21:58作者: junlin623

问题:

最近用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,按照提示输入用户名和密码即可

<