使用SourceTree Push代码的时候提示 Incorrect username or password Authentication failed

5 阅读1分钟

安装 SourceTree 之后第一次push代码的时候,不小心输入错误的密码,导致push失败,提示 Incorrect username or password 和 fatal: Authentication failed。如图:

image.png

解决办法: 找到安装目录 C:\Users\username\AppData\Local\Atlassian\SourceTree

  1. 删除文件 passwd 重置密码
  2. 删除文件 userhosts 重置账号

再次 push,SourceTree 会让你重新填写账号密码 image.png