Hello,
I have been dealing with this issue below:
fatal: Authentication failed for 'https://bitbucket.org/xyx/abc.git/
Please note, I have no issues accessing this through the browser. Also, I am authenticating with OAuth in sourcetree.
I have tried all the solutions posted on:
https://community.atlassian.com/t5/Sourcetree-questions/Getting-quot-fatal-Authentication-failed-for-quot-error/qaq-p/624663
As well as the solution posted on:
https://community.atlassian.com/t5/Sourcetree-questions/fatal-Authentication-failed-for-https-bitbucket-git/qaq-p/1897000
To summarize the two threads and to list all the methods I have tried:
Solution A
- Navigating to C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree and removing the passwd file.
- Doing a Push/Pull will cause a dialog to appear to re-enter your password
Solution B
- Make sure SourceTree is closed
- Make sure the files are backed up in the following folders before removing the files
- Remove files "bookmarks.xml", "opentabs.xml", "userhosts" in C:\Users\<username>\AppData\Local\Atlassian\SourceTree\
- NOTE: I could not find the userhosts file in my version
- Remove file in C:\Users\<username>\AppData\Local\Atlassian\SourceTree.exe<random_string>\<version_number>\user.config
- Open SourceTree again to test if it worked or not.
Solution C
- Go to Tools > Options > Authentication
- Click on Account, then click Delete
- Click on Add to re-add Account
Solution D
- Go to Terminal
- Write GIT PUSH (or GIT PULL)
- Enter Username/Password when prompted
Solution E
- Go to Control Panel\User Accounts\Credential Manager
- Click Windows Credentials
- Re-enter all sourcetree and git credentials
Solution F
- Uninstall Sourcetree
- Install Sourcetree
Again, none of these solutions worked for me, but have had success for others. If you have any other idea that could help, I'd be very grateful.
Thank you for your help.
SourceTree Version: 3.4.8
------------------------------------------------------
How I got it to work:
- Log into atlassian
- Go to personal settings
- Go to App Passwords
- Generate an App Password with permissions as you see fit, make sure to take a copy of the password
- Navigate to C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree and removing the passwd file.
- Do a Push/Pull in SourceTree
- Enter your App Password