Sourcetree can't pull/push login problems
Asked by AntonQUT:

I am updating bitbucket through source tree but it stopped allowing me to push/pull with the same problem:

remote: Too many invalid password attempts. Try logging in through the website with your password.

I have gone to the Accounts section and re-connected in SourceTree and I have gone to the bitbucket and Atlassian website and logged out and logged back in.

I need to fix this ASAP as I can't access the project


Answers:
author: Ana Retamal
body: Hi Anton! Can you try resetting your Atlassian password using this link <https://id.atlassian.com/login/resetpassword>?

After that, log in again to [id.atlassian.com](https://id.atlassian.com/profile/profile.action) with your email and password (make sure NOT to use the Google login). You may be asked to go through a captcha screen. Once you get logged in properly to id.atlassian.com, you can try pull/push again and let us know if it works. If it still doesn't, can you:

* Attempt performing pull/push using the command line? Is it successful?
* Tell us whether you're you using HTTPS or SSH?

Best regards,

Ana

comments: author: AntonQUT
body: thanks ana


author: Truong Huy Cuong
body: You save my life! Thank you very much


author: Nelson_Roberts
body: You saved my day..like literally!!


author: sravani
body: Hey mate,

I followed same steps but no luck! Still its asking me for credentials and even upon entering correct details also its saying as wrong.

Could you please help me on this.


author: Malaka Trivikram Naidu
body: Hey ana ,

i tried to reset my password and then login to bitbucket and tried to push it from source tree, still m not able to push. its still saying invalied username and password, though every thing is right.

please help me out.

thank u


author: Balint Nagy
body: I have the same issue as Malaka.

I did all the password reset stuff, logged on from my development box, BitBucket push asks for authentication but it fails.


author: o_matsuo
body: Popup of authentication confirmation is displayed indefinitely.


author: Gaurav Patel
body: I'm having the same issue with SourceTree on a repo that was working before. All of a sudden I started to get this error when trying to push/pull

**remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.**

I had also see the erorr above before that:

**remote: Too many invalid password attempts. Try logging in through the website with your password.**

I tried what it said and I could log into the atlassian and bitbucket website just fine. I also reset my password to be sure to the same previous password.

From Source Tree I was also able to successfully refresh the oAuth to bitbucket from sourcetree. That works fine and succeeds and then I can see the list of repositories in source tree.

However, When I try to push/pull from a previously cloned repo or try to clone a new repo that is listed in source tree (from successful OAuth to Bitbucket) then I get the error:

**remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.**

Now I consistently get this error. Please let me know if you know how to solve this issue.

comments: author: Ana Retamal
body: Hi Gaurav, there's an existing thread regarding this issue at [Authentication issues](https://community.atlassian.com/t5/Bitbucket-questions/SourceTree-2-1-10-0-Authentication-Issues/qaq-p/623202). Some members of the Community have shared the solutions that worked for them, there are 3 available solutions right now:

* Delete the Windows Credentials stored in Windows (that's where SourceTree stored them), delete the passwd file, then restart SourceTree. To see and remove them, do the following:
  * Open the **Control Panel** and click on **User Accounts** .
  * In the left hand list of links, click **Manage Your Credentials** . When it opens, it shows your Web Credentials.
  * Click the Windows Credentials "button". This shows your stored Windows credentials. Look for entries that start with "git:http" and include your server name and/or user name and remove them.
* Go to **Repository \> Repository Settings** , selecting my repository, and changing the username from my old Bitbucket username to my Atlassian account's email address. Then, following your original advice to remove the passwd file, I was able to successfully pull.
* Download SourceTree version 2.1.2.5 from [our website](https://www.sourcetreeapp.com/) and install it. Reject the upgrade to 2.1.10 that comes up.

I hope this works for you! If it doesn't, my recommendation would be to post your answer in the original thread.

Cheers,

Ana


author: ero_stefano
body: Hi Ana

Downloading the version 2.1.2.5 solved the problem.

Greetings


author: Maitreya Bhatnagar
body: Tried all that still getting the same error can anyone help.Trying to clone a repository

**remote: Invalid username or password. If you log in via a third party service you must ensure you have an account password set in your account profile.**


author: Frederick Dyste
body: I ran into the same problem but my solution ended up being updating my password in Accounts. I got to Accounts by going to the SourceTree splash screen, clicking on the gear icon, selecting Accounts and editing my login information to update my password.  

I realized this when I was able to push through command line and it asked me for my password, then pushed no problem. The odd thing is I changed my password a few weeks ago and the issue just caught up to SourceTree. Seems like a big lag from changing the password to it being an issue in SourceTree.


author: dominique_denie
body: I keep having the same issue, and when I go to accounts i see this error

**failed to get user details for user \[DomiDenie\]**

**You do not have permission to access URL '<https://api.bitbucket.org/2.0/user>'. The request returned with status code 'Unauthorized'**

Anyone have a solution for this?


author: Balint Nagy
body: I have the same issue with Sourcetree 3.0.15.

I have two development boxes (A and B). I can push, pull from B, but I can't PUSH from A.

I tried the password reset solution, but it didn't solve the issue on A, which is annoying, but the scary one is that I can still pull/push from B using the old password!!! (I mean without being asked to log in again)

I haven't yet deleted the password file - where is that?

I tried installing older versions, but the zip files in the download archive don't contain installables. Am I missing something?


author: H?seyin Avni Yal??n
body: sourcetree is not working with bitbucket on windows 10

can not push or pull


author: samuel.zhang
body: I have desktop PC and laptop, the Desktop PC SourceTree works fine, but laptop keep failing on password when I pull/push. Because of using the SourceTree everyday and worry about reset password will potentially stop my desktop SourceTree, I reinstall SourceTree for my laptop

I check the "Generic Credentials" for the laptop, missing "git:https://Name@bitbucket.org".

1. I remove all the "bitbucket.org" related items from "Generic Credentials",

2. Install "SourceTreeSetup_3.3.8.exe".

3. "Registration" , press "Bucket" icon, it launch browser with "Authentication Successful", the button "Next" never active, so I can't go further for installation.

4. I can use browser to view my repositories on "bitbucket.org".

What's wrong with me?

Regards

Sam