Sourcetree remote: Invalid username or password

倾然丶 夕夏残阳落幕 提交于 2019-12-02 14:48:15
Sven van den Boogaart

I found the answer here, it is a known bug for version 2.1.8+

The following steps fixed it for me:

Tools > Options > Git > Update Embedded Git

Also pushing with the command line works.

EDIT

Also adding @Latisha's answer:

1. Do the above.
2. Close Sourcetree
3. Delete AppData\Local\Atlassian\SourceTree\passwd 
4. Restart SourceTree
5. Hurray!!!
AlonR

I struggled with this a lot, what solved it for me on my Mac is:

  • Open finder, click Cmd + Shift + g
  • enter ~/Library/
  • Go to Application Support/SourceTree folder
  • delete userName@STAuth-bitbucket.org
  • Open KeyChain Access
  • search for sourctree
  • delete the 'login' item
  • clone your source from bitbucket
  • KeyChain will ask for you bitbucket pass

I had the same problem for Sourcetree 2.10, but with the above solution not working.

Reverting to version 2.0 solved it.

Sourcetree download archive: (https://www.sourcetreeapp.com/download-archives)

I faced this issue when i updated Embedded Git. Solved it by removing passwd file. you can find it here. then restart source tree.

AppData\Local\Atlassian\SourceTree\passwd

If you do have two-factor authentication enabled in GitHub you might have gotten here as well. In that case follow AlonR's answer (for Mac - worked for me) or Sven's answer (for Windows - untested) and then follow the instructions here to make it work.

  1. Delete your saved account in tools\option dialog.
  2. Push or pull again, and SourceTree will ask you to input your login name and password.

I had the same problem , I Relogged In to the account solved this error for me.

I had the same problem and I fixed it by installing the latest version of git for windows

For SourceTree 2.7.6 for macOS using embedded git I followed all the suggested answers but still had the same problem.

The solution for me was to turn off two factor authentication.

Obviously not ideal, but sometimes you just need to get your work done.

On Windows try:

  1. Tools> Options> Authentication - delete from Git Saved Password your problem repo data (ex login@repo.com)
  2. Select tab with problem repo.
  3. Open terminal and make some git command (ex git pull origin) and you will be asked login and password. Input correct login and password. Login and password will be updated and all works again.

I just solved this problem by using an access token. I use macbook, all answers above didn't work for me. Go to your github account, click your profile image on right top corner, then click:

Settings -> Developer settings -> Personal access tokens -> Generate new token

Paste this token into sourcetree popup window, required password area, instead of typing your account password. Github uses two step verification, so you need to use a token rather than account password. Good luck! Let me know if this works for you.

I typed the wrong username (email address) when pushing and what worked for me was:

Open KeyChain Access search for SourcTree delete the 'login' item

Then go to Sourcetree > Preferences > Advanced and delete the default usernames that includes the wrong email address.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!