SourceTree Login failed for your Bitbucket account. The remote service said: 'Login error'

MrBalin March 22, 2016

I tried to login to Bitbucket from Sourcetree and seem to be getting the same Login Error message:

Login failed for your Bitbucket account.

The remote service said: 'Login error'

 

How could I go about fixing this?

10 answers

17 votes
eliRotenberg March 26, 2016

I had this problem.  To fix:

1-go to source tree window, clicked remote

2-little gear icon, clicked "settings"

3-double clicked on Bitbucket server, changed protocol from default HTTPS to SSH

 

that's all it took to fix

danielfelipe113 September 19, 2016

Thank you! This fix it!

James McLerran December 14, 2016

Thanks much. Worked for me also.

Like # people like this
Suchi Julidayani June 23, 2020

this works! thank you!

Jesse Daniel Cano Otero February 11, 2021

Excellent!!! This solution works perfectly!!!

6 votes
pdxalz December 3, 2018

After many hours of fumbling around, removing the passwd file was the fix that finally worked for me, detailed here:

https://community.atlassian.com/t5/Sourcetree-questions/How-to-update-HTTP-S-credentials-in-sourcetree/qaq-p/297564

6 votes
Sebastian Koszela July 6, 2016

Hi Eli - what do you mean by "remote" as I don't see it in my Source tree

Familusi Babaranti September 24, 2016

I was able to get it working by following the steps below (Windows 8 OS)

  1. Click on Clone / New
  2. Select the browser icon to load the source path (you will get the error)
  3. Click on Edit Accounts (upper right)
  4. select your account (mine was listed)
  5. click edit (it will ask for your password) and load another form where you can change your preferred protocol to SSH.
  6. Note that your username should be Bitbucket username and not email

Hope this helps

 

 

1 vote
kalev_rebane February 15, 2020

fuck this half baked company with their half baked products

im uninstalling all their shit

and selling all their stocks

gonna use github instead

lmuffatti March 24, 2020

You are right

1 vote
WEBCODER LTD (EU) November 5, 2018

Mac OSX 10.13.3 same issue - am entering correct Bitbucket server base url, username and password and am getting Login erro all the time... what a waste of time... I have SSH private key added to my key manager.

I just downloaded the latest SourceTree (funny - it doesn't even allow you to look up version before authentication - what a nonsense!). Have an older version on another machine and it's still working. Wasting more and more time with Atlassian products = starting to decrease my productivity significantly.

Assaf June 3, 2019

Hey, I'm having the same problem!

Just upgraded to SourceTree 3.2 (224) and started having this shit issue.

Don't know what to do! annoying!!!

Please assist..

Like Deleted user likes this
pdxalz June 3, 2019

On windows the fix for me was to go to C:\Users\USERNAME\AppData\Local\Atlassian\SourceTree and remove the passwd file.

Assaf June 3, 2019

I removed the password file on the equiv. mac directory (~/Library/Application Support/SourceTree) and it didn't help. So annoying! going to stop using Sourcetree, too many bugs!!!

EDIT: After wasting a couple of hours on this, it worked after I changed to SSH and created a KEY + uploaded it to bitbucket. This BUG shouldn't have happened in the first place.

Like Deleted user likes this
Assaf June 7, 2019

The SSH thing didn't hold up for long, I don't know if it is related to bugs in bitbucket (which made my SSL key disappear after a couple of days)

Bottom line, I converted the repository back to HTTPS and found the line that fixed my constant password-asking issue:

Run:
1. git config credential.helper store
2. git push
3. Enter user/pass for one time

Also, I had to change GIT preferences to use System GIT and not the embedded buggy one.

That's it. Fixed it, Sourcetree is not nagging again about bitbucket password.
If (2) is not displaying a username/password query, then credentials must be deleted somehow before doing the same scenario again.

Hope it helps someone.

Stupid bug.

Adam Burt January 7, 2021

Thanks. This solution worked for me. I used to use the delete password file in app data and that stopped working. 

0 votes
Bhala April 18, 2020

1. Open the SourceTree App from Windows Operating System (as I'm not sure of other OS, may be worth trying out this same fix)

2. In Registration step, once entered the Root URL & Username by selecting the BitBucket Server (if this option doesn't work, try clicking the another one), click on Login which will prompt for password, once entered correctly, then still it might not allow you to proceed

3. Close the setup dialogue and again reopen the SourceTree App

4. Now you should be able to see your username and corresponding email registered in your bitbucket and succeed, complete the setup of SourceTree.

0 votes
hoang408 October 30, 2019

For me, I have to change from SSH to HTTPS for it to work.  Sooooo annoying!!!!!!

0 votes
fire_muc September 2, 2019

Hey guys, I solved it like this:

  1. I went to Bitbucket and created a new empty repository there
  2. Then I went in my lokal Terminal and made:
    git remote add origin git@bitbucket.org:<bitbucket-username>/<new-repo-name>
  3. From that point on I could push/pull
  4. And yes - I changed my connection from https to SSH, like described before

Cheers

0 votes
Joshua Lovato May 28, 2018

I was able to resolve this error by backing up and using my atlassian community login instead of my bitbucket login.

0 votes
Kirsten Greed October 8, 2016

This fixed one error.  However I then ran into problems trying to get SSH woring.  Namely when I tried to clone a repository I got an error

"Authentication via SSH keys failed"

I  created the SSH key using Tools > Create or Import SSH Keys.

The error asked "Do you want to launch the SSH key agent (Pageant) and retry?

When I tried this  the error repeated.

I have added the key using Pageant in the system tray and set it to default.

Strangely I have now reverted back to HTTPS and things seem to be working.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events