Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Sourcetree failed to login to bitbucket

Bradley Hatton - Jones
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 30, 2018

Hi, 

I have checked my authentification by going to tools>Authentification using password check and even did a OAuth check. The checked and approved status is set to my default bitbucket profile on source tree. Everytime I do a fetch on source tree it asks for a username and password and when inserting my password in anyway it says that it failed to login. 

Exact error message : 
Logon failed, use ctrl+c to cancel basic credential prompt.
remote: Invalid username or password
fatal: Authentication failed for 'https://B-----------@bitbucket.org/B--------/m----------.git/'

I dont know what more to do.

Regards

2 answers

1 accepted

23 votes
Answer accepted
Bradley Hatton - Jones
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 1, 2018

Managed to get help outside of this community help page. Nobody seems to be active here. 

Posting my solution in the hopes that it helps somebody else in the future that has the same issue. 

Problem : Something gets conflicted or corrupted in the saved passwords and authentification files. 

Solution : 
1. In sourcetree -> tools -> Options -> Authentifications. 
Clear everything, even not bitbucket related (Dont forget to write down your saved items to place back later)

2. Close sourcetree

3. C\Users\[OwnerName]\AppData\Local\Altassian\Sourcetree
Find a file called "passwd" and delete that. 

4. Start Sourcetree
Go to Authentification again and insert the OAuth of your bitbucket (Be sure to be logged into bitbucket on your browser before you click Authenticate. )

5. Do a fetch on the repo giving you pains. It should ask you for your password. Once you have entered your password be patient, the fetch will take longer than usual but should work without constantly saying that you dont have correct username and password. 

Hope this helps. 

@altassian : Get your shite together man. According to google searches this bug has been active since early 2015. Its December 2018 man. 



2sloth
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 18, 2018

This worked for me! thanks!

Like Rick Holtrop likes this
Scott Morphett
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 17, 2022

@Bradley Hatton - Jones 

Its 2022 and this workaround still works!

Thanks

Like # people like this
Gino Ciavarella
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 1, 2022

Bradley you are a champion - this worked flawlessly after this problem suddenly occurred for me today for no apparent reason

Matthew Allen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 1, 2022

Looks like today was also my bimonthly Sourcetree auth headache.   Sourcetree continuously asks for my password.  I enter it, no luck.  Password is still good as it works in a browser.  I've created the auth token for this app in BitBucket and can successfully use it and login using other apps.

In addition to Bradley's instructions above, I also had to refresh my OAuth token.

Menu, Tools, Options, Authentication tab
Refresh OAuth Token button

I didn't get a chance to try the refresh w/o deleting everything first.  Maybe that alone would have solved my problem.

Like # people like this
Jo Cooling
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 27, 2022

I had to do the Refresh OAuth Token too and then it worked. Phew!

MoreThanOneNil
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 25, 2022

Thank you, sir!  This solved my problem. :)

giovanni-mattucci February 9, 2023

2022 the problem is still here Atlassian...  this didn't solve my problem though. An Atlassian sign in shows up, and logging still fails.

Getting:

"Logon failed, use ctrl+c to cancel basic credential prompt."

Like Vanessa Straube likes this
Cedric Vereecke
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 18, 2023

Thank you! 🙂

Cedric Vereecke
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 22, 2023

@atlassian the bug seems to be reproducible when switching from devices. I code on multiple devices and seem to get this bug after a device switch.

Recently been able to fix it by going to Tools > options > Authentication > Edit >Refresh OAauth Token (these steps didn't fix the problem the first time it occurred though)


Hope this helps in finding & fixing this issue

Like GustavoHennemann likes this
Maksym Berezhnyi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 13, 2023

The fix still works in 2023. Thank you, Bradley!

Brenda Camacho Garcia
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 4, 2023

April 2023 and still working! Thanks :)

Russell Fox
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 2, 2023

If you are a moron (raises hand) and can't remember which saved pwd it is, you can just keep deleting the <passwd> file to re-try, you don't need to remove/replace the oauth every time.

alex351
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2024

needed to provide the app password, not just any login password.
Created in personal bitbucket settings.

0 votes
Cemejn April 2, 2023

I remember having some issues, that I resolved 2 years ago. Now, after 2 years in 2023, with new PC, I cannot get it to work, following the above steps and messing around in the SourceTree. Nothing seems to work.

this error shows up on failed PUSH:
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags --set-upstream origin master:master
remote: Login failed due to incorrect login credentials or method.

And my login works on web but is not apparently accepted (although OAuth is verified in the Tools/Authentication).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events