Too many failed authentication attempts. Please try again a bit later.
Asked by pbdr:

I'm running the Mac Sorucetree client.

In the last 6 months I've been getting this error more and more frequently when I make a push/pull request, I usually leave it 10-15 minutes and all works ok.

The thing is I used to be abel to push and pull across projects without seeing this error, now I get it more ofthen than I see a sucess and it really hampers iour team workflow.

Anyone know of a fix or is it just me?

I keep upgrading in the hope it is fixed, but I've just tried v2.5.3 and its even worse (even though the release note say its fixed)

Thanks

-- Ken


Answers:
author: bgannin
body: Hi folks,

I recently posted our official response over in: <https://community.atlassian.com/t5/Bitbucket-questions/Authenticating-with-Bitbucket-not-possible/qaq-p/502460#M25871>

Hopefully that explains a bit and shows that we are listening.  

Brian Ganninger  
Senior Mac Developer, Sourcetree


author: Brady Volpe
body: Seeing the same thing. Actually have been for several months now on BitBucket along with several of my developers. Running MAC OS X and staying up with latest SourceTree releases.

Github works fine along with every other login I have. This is a BitBucket issue.

For what it's worth I've already migrated away from Service Desk and Confluence due to other related issues there. If this is not resolved with BitBucket I see our team moving away from BitBucket and Jira.

Atlassian please take some forum comments seriously. The comments related to Service Desk / Confluence were over 6 years old, which is why we left. It would be very helpful if you addressed issues.

Thank you.


author: eXeDK
body: I've started to see this as well. It fixes itself after a while of trying but very annoying.

SourceTree 2.7.1 (159) on macOS 10.13.3


author: weirdbeardmt
body: Just posting because I am seeing exact same as OP and it's 2 months since last post.

SourceTree / Mac / Bitbucket. Seems to be every other commit and I have to login again. Tedious.


author: timothymarois
body: I would like to add that I have been seeing this issue a lot more myself recently. Either from the CLI or from SourceTree App. I wait and then it works again, but sometimes I haven't done any actions and the first push I'll get this error and if I wait it's all good, but it is annoying after a while. And then I randomly get it on push/pull actions.


author: Manju
body: Can you provide details on the repo URL and the account that is added in SourceTree? I'm looking for the protocol used, https vs ssh in both repo URL and account. If there is a mismatch. i.e., one is https and the other one is ssh, I would recommend correcting either of them to have the same protocol for both.

comments: author: timothymarois
body: This error

```
Too many failed authentication attempts  
```

Needs to be fixed or removed. It really halts development esp with production environments when I can not pull an updated version. Absurd. I don't see this issue with Github.


author: Manju
body: I would recommend you to add your account back again after removing your bitbucket account added in Sourcetree from the preference window and removing any bitbucket related items from keychain.

If that doesn't help, here are some solutions based on the protocol you use,

HTTPS auth issues: [https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-requires-login-for-every-pull-and-commit/qaq-p/677325](https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-requires-login-for-every-pull-and-commit/qaq-p/677325 "https://community.atlassian.com/t5/Sourcetree-questions/SourceTree-requires-login-for-every-pull-and-commit/qaq-p/677325")  
SSH auth issues: [https://community.atlassian.com/t5/Sourcetree-questions/Sourcetree-keeps-asking-password-after-installing-version-2-6-3/qaq-p/672878](https://community.atlassian.com/t5/Sourcetree-questions/Sourcetree-keeps-asking-password-after-installing-version-2-6-3/qaq-p/672878 "https://community.atlassian.com/t5/Sourcetree-questions/Sourcetree-keeps-asking-password-after-installing-version-2-6-3/qaq-p/672878")


author: timothymarois
body: This is much bigger than just source tree. This is happening everywhere. And a lot more often now. I'm seeing it on the SSH side almost every time. Taking 10 minutes or more to get changes pulled.


author: Manju
body: If you are using ssh on command line and seeing errors, please check if you have your ssh key loaded on the agent. Run below command to list all keys loaded in the argent.

```
ssh-add -l
```

If you don't find the key you are expecting, add it by running below command,

```
ssh-add <path to key>
```

For me, this would look like this,

```
ssh-add ~/.ssh/id_rsa
```

Thanks!


author: Nic Brough -Adaptavist-
body: This sounds like a problem with the repositories and your connection and/or access to them. Sourcetree is just showing you another symptom.

You'll need to get the repos or your connection fixed.

We can't tell you where to start with that unless you tell us where they are.


author: timothymarois
body: [@Nic Brough -Adaptavist-](/t5/user/viewprofilepage/user-id/781454)First, it is not my connection. Second, it is only the repos from bitbucket. Github works fine.

This is absurd because it happens so often, and very frustrating.

[@Manju](/t5/user/viewprofilepage/user-id/222564)It's bitbucket server, ever since recent updates. No issues anywhere else. It is def not login issues. Have you seen the recent bugs in the sourcetree high priority? One of them is related to this.

And to close all this off, You can not have "too many failed attempts" if it's your first successful login. Fix your code.


author: Nic Brough -Adaptavist-
body: Ok, you've narrowed it down to your Bitbucket connection.

I'd want to read the Bitbucket logs to look at why it's failing, but I still think you're going to find it's the connection hanging. "too many failed attempts" is the error in the code that occurs when Bitbucket logs many attempts to log in with either the wrong password, or none passed at all (when using the API)


author: Manju
body: I can understand your frustration. However, you don't have to remind us of what issues we have on Sourcetree and what priorities they are. We are actively investigating this and doing all that we can to help you and other fellow developers.

Going by what you've already said "I would like to add that I have been seeing this issue a lot more myself recently. Either from the CLI or from SourceTree App." this is not just Sourcetree. There is something more.

We seek your cooperation and help by providing as much info as you can to get this done. Your patience is much appreciated!


author: Ana Retamal
body: Hi Ken! Do you have a lot of visible repositories in the repository browser? If you do you might be affected by the bug [SRCTREE-4542](https://jira.atlassian.com/browse/SRCTREE-4542). You can add a comment or watch that ticket to receive further updates.

Let us know if you have any questions!

Best regards,

Ana


Tags: mac