Getting "Too many invalid password attempts." error message in SourceTree daily when pushing to BB
Asked by RJ Davis:

I have needed to reset my id.atlassian.com password at least once a day for the past week or so to fix the below message I get whenever I try to push/pull to BitBucket using SourceTree for Mac. After I reset my password and login to id.atlassian.com then SourceTree will work for a few hours before I see the same message again.

I revoked all other OAuth access to my Bitbucket account with the excption of my current machine. I also checked Bitbucket sessions and did not see anything out of the ordinary. Does anyone have any ideas as to what might be causing this? It makes development very frustrating.

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

SourceTree Version 2.5.3

Bitbucket User <https://bitbucket.org/rjdavis3>


Answers:
author: Chris Reece
body: So we actually filed a support case and it was resolved for us with the following response from Atlassian:

**"Please try to clear Bitbucket Credentials from your machine (Windows : Credential Manager / Mac : Keychain Access)**

**Next please navigate to bitbucket password reset to reset your password. Once you have reset your password, please try to login to Bitbucket on the Web UI.**

**Once login is successful, please try a git operation from your git terminal."**

For me personally, the password reset and the keychain removal resolved the issue 100%. I haven't seen it popup again (so far \~ 3 days).

comments: author: RJ Davis
body: [@Chris Reece](/t5/user/viewprofilepage/user-id/609734) good point about the KeyChain entries. I removed those as well. It must have been some bad creds lingering from before the move to unified Atlassian products login.


author: Chris Reece
body: We got new macs at the office and that's the only thing that has changed in years. I'm not sure how the credentials got bad (if that is truly the case). As long as I can push/pull I am good to go!


author: kairaca
body: I suddenly had the same problem after changing my Atlassian pw.

I did the above for my PC and now, instead of too many bad login attempts, it tells me my pw is wrong in Sourcetree (ST).

Not sure where to go from here. Tried to update pw in ST settings but to no avail. Unstalled and reinstalled Sourcetree. Typed in new pw in Edit Accounts. Re-authorized there too. '

Help??


author: Chris Reece
body: I'm having this issue again (at a new company) and I've yet to find a workaround as I cannot log in except for google OAuth.


author: RJ Davis
body: [@Chris Reece](/t5/user/viewprofilepage/user-id/1170892) I have been seeing it again recently too. Definitely just a SourceTree issue as well. I tried out GitKraken for about 2 weeks and never saw the "too many password attempt" issue once. I'm about ready to buy the license for that and be rid of SourceTree for good.


author: Chris Reece
body: I too am going to have to switch to another UI or just use command line. Which I dislike as I really really like SourceTree when it works correctly and it *has* worked well for me in the past for YEARS. I cannot have this issue like this all day as it is very annoying to have to open a browser and navigate to that URL in **hopes** that it'll let me push my code. If i could add my account via basic https, this resolved my issue at my last company but since this is no longer the case (have to OAuth via google) this application is nearly useless for me.


author: RJ Davis
body: I think I might have fixed this on my machine.

I completely uninstalled SourceTree (removing everything in **\~/Library/Application Support/SourceTree/** and running **defaults delete com.torusknot.SourceTreeNotMAS** in Terminal). I removed any KeyChain entries for Bitbucket. I then downloaded and installed Version 2.6. I also removed any local repos I had. Finally I enabled two-factor authentication on my Bitbucket account and added my Bitbucket account to SourceTree. So far I have not gotten the "Too many invalid password attempts" message again.

comments: author: Chris Reece
body: Thanks for the info. I've also added what has worked for us via Atlassian support response.


author: Chris Reece
body: We are getting the same error as well. I can log into bitbucket no problem. This is ++***HIGHLY***++ annoying as I can't even push code now. I've done the same steps you've outlined and can't even get it to work temporarily.

comments: author: RJ Davis
body: It happend to me twice today so far too. My latest work around has been going [here](https://id.atlassian.com/manage/change-password) and changing my password. Even setting it to the same password seems to reset this silly 403 error. At least that saves me from the forgot password email flow.

Still highly annoying though. I even tried wiping my SourceTree settings and starting over using [this link](https://confluence.atlassian.com/sourcetreekb/how-to-wipe-sourcetree-preferences-412484640.html).


author: Chris Reece
body: I responded below with what worked for us.. probably should have done it here but its below.


author: JosephGTaylor
body: I had to follow the steps RJ Davis posted under his "[here](https://confluence.atlassian.com/sourcetreekb/how-to-wipe-sourcetree-preferences-412484640.html?_ga=2.221685725.434018443.1505145304-83343415.1460474149)" link, except I just deleted EVERYTHING in my AppData/Local/Atlassian folder. I reopned SoureTree, and readded my work repo. It failed to log in. I went to my bitbucket settings, and followed the link to my Atlassian account settings. I reset my password there. Then in SourceTree I used my work email address(not my user name) and the new password I created in the Atlassian account(not my google login password) and I was able to login. Yet, I CANNOT login to Bitbucket in the same way. It forces me to login there with my google email address(work) and it's password. Atlassian, I love you. Truly. And I understand you are trying to bring all of your login stuff into one great way of loggin in. And I understand it is not a trivial problem. But you are not doing a good job here. You can do better.


author: kossy_gene
body: This error seems to have been neglected for several years, is there a solution?


author: Syed Waqas
body: I am not even using SourceTree, I am using command line and getting the same problem from both Linux and Mac.

I logout and then log back in, which fixes the issue for a little while, but it is such a pain to logout/login just for the sake of a git command.

Any fixes on this?

comments: author: Syed Waqas
body: I figure this is because from somewhere, an automated job is trying to access my account(some CI/CD pipeline) which causes my account to lock. I am not able to find where these authentication requests are coming from. Is there a way to find from where these requests are being generated?


author: vasthana19
body: Hi Team,

Can anybody help me to come out from this error. Test error here.

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin  
fatal: HttpRequestException encountered.  
An error occurred while sending the request.


author: Krzysztof Lesisz
body: Same issue. I tried all above and it worked only for couple of git operations. Nightmare.


Tags: authentication

bitbucket