Constantly getting login 403 error in sourcetree
Asked by MelissaB1517:

I get the 'too many login attempts error' multiple times a day. I have to reset my password every time for it to work. It really slows my day down having to reset my password 5-10 times a day. Is there a fix for this issue? I see quite a few people have the same problem.

Thanks


Answers:
author: Ana Retamal
body: Hi Melissa! Can you give us some more information so we can narrow down your issue and help you out?:

1. Are you using Sourcetree for Windows or for Mac?
2. To which service are you connecting it? Is it Bitbucket Cloud, Bitbucket Server, Github...? Can you confirm your account was set following the steps at [Connect your Bitbucket or Github account](https://confluence.atlassian.com/get-started-with-sourcetree/connect-your-bitbucket-or-github-account-847359096.html)
3. Are you getting this error consistently? Does it happen every time you perform a certain operation, or does it happen randomly?
4. Have you tried to perform the same operation from the command line? Do you also get this error?

Best regards!

Ana

comments: author: MelissaB1517
body: 1. Mac

2. Bitbucket Server, yes I have done the connecting of the account many times. Sometimes that's the only way it will work again. Its already connected but I have to enter all my info again and it works sometimes. Other times I have to go reset my password entirely and then it will work.

3. I would say it's somewhat random, whenever I want to push or pull for the first time that day it will give me the error, then I do one of the solutions I mentioned above and it works for a little while, then I started getting the error again after a couple pushes/pulls

4. I do not have the command line set up


author: Emiliano Sacchi
body: Hi:

I have the same problem. I created a bitbucket issues for this problem [BBS-77777](https://getsupport.atlassian.com/servicedesk/customer/portal/11/BBS-77777)

* Sourcetree version: 2.7.3 on Mac
* Bitbucket Cloud: to my company team
* I'm login in to bitbucket and sourcetree using my company google apps account

```
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch origin
remote: Too many invalid password attempts. Log in at?https://id.atlassian.com/?to restore access.
fatal: unable to access 'https://[my user name]@bitbucket.org/xxx/yyy.git/': The requested URL returned error: 403
Completed with errors, see above
```

After I Log in at [https://id.atlassian.com/ this](https://id.atlassian.com/?this) can be read at Sourcetree

```
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch origin?
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.
fatal: Authentication failed for 'https://[my user name]@bitbucket.org/xxx/yyy.git/'
```

```
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree pull --no-commit --log origin master?
From?https://bitbucket.org/xxx/yyy.git/

branch master -> FETCH_HEAD
Updating 6476563..99a666c
Fast-forward
src/main/filters/DEMO_PTS/db.properties | 8 ++++----
1 file changed, 4 insertions, 4 deletions
Completed successfully
```


author: Manju
body: Can you please enable debug logging in Sourcetree and send us some logs?

You can enable debug menu from Preference -\>Advanced -\> Show debug menu.

And from the new Debug menu, turn on Enable Auth logging and set log level to Verbose.

All auth logs will be written to console. Sourcetree specific logs can be found by opening the logs folder (an option on debug menu).

In the meanwhile, please check if this helps

In the repo browser, right click on the repo you have an issue and select convert to ssh and then convert back to https. This sets the right URL format in the remote settings.

Also, please let us know if there is a particular pattern for this issue. May be like happens an hour after setting authentication, two hours after, etc.

Additional question, have you added your bitbucket cloud account in Sourcetree accounts? What authentication type have you used?

Thanks,  
Manjunath  
Sourcetree Mac Developer


author: Manju
body: And like wise for Bitbucket server [@MelissaB1517](/t5/user/viewprofilepage/user-id/1307167)


author: MelissaB1517
body: ![Screen Shot 2018-04-30 at 1.38.57 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/20994i529E6C58F0953584/image-size/large?v=v2&px=999 "Screen Shot 2018-04-30 at 1.38.57 PM.png")I've tried to push twice and am still getting the same error, I don't see a recent error log from today though


author: Manju
body: [@MelissaB1517](/t5/user/viewprofilepage/user-id/1307167) Would you mind giving this [custom build](https://drive.google.com/file/d/1IUyXAw-h6Qnl4KUDHosCnnTJ0Xq6AbRR/view?usp=sharing) a try and let me know if this is any better?

Thanks so much for the details provided and trying the new build.


author: MelissaB1517
body: Seems to be working perfectly so far! Haven't had any issue today. Thank you so much!!


author: Manju
body: Glad to hear that. We will roll it out in the next beta this week. I'll post the link here and also when it gets released through regular channel. Please make sure you update to the regular build when its available to keep receiving the updates.


author: Josevin
body: Hello,

I am also facing the same issues and tried custom but no luck, getting below error. please help

![Screenshot 2019-03-21 at 6.39.00 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/49268i3DEA4AAB3D02A0D2/image-size/large?v=v2&px=999 "Screenshot 2019-03-21 at 6.39.00 PM.png")


author: ElKatz
body: I am also getting the same error.

Everything works smoothly on terminal. it is Sourcetree specifically that fails.

Please help!


author: Sriram Vaitheeswaran
body: I am using v3.3.8.

I am facing the same error from April mid I guess.

Everything is perfect on running git from cmd.

But any command (fetch, pull, push) from sourcetree fails with 403 error.

I'm behind proxy and using gitlab repo for the past 2 years.

Btw, the sourcetree terminal is also not working. This might not be related to this issue. Just letting you know.