Sourcetree Enterprise Setup - unable to login to hosted bitbucket server
Asked by rhopkins76:

After installing SourceTree Enterprise 2.5.5 I'm unable to get passed the Register Account screen in setup. No errors show up in the Bitbucket server logs, other than this in the access log (scrubbed of IPs and username):

X.X.X.X,X.X.X.X \| https \| i@1BQI1U6x977x62993x0 \| - \| 2018-06-06 16:17:07,859 \| "GET /rest/api/1.0/users/user.name HTTP/1.1" \| "" "" \| - \| - \| - \| - \| - \| - \|  
X.X.X.X,X.X.X.X \| https \| o@1BQI1U6x977x62993x0 \| user.name \| 2018-06-06 16:17:07,922 \| "GET /rest/api/1.0/users/user.name HTTP/1.1" \| "" "" \| 200 \| 0 \| 259 \| - \| 60 \| - \|

![6-6-2018 4-17-35 PM.png](/t5/image/serverpage/image-id/23974i087CFB152166655D/image-size/large?v=v2&px=999 "6-6-2018 4-17-35 PM.png")


Answers:
author: Mike Corsaro
body: Hello! Can you try removing the "/bitbucket" part of your login? Additionally, does your username include a special character such as a @?

comments: author: rhopkins76
body: No, /Bitbucket is where the app is hosted. We've got everything behind virtual directories so Jira is [https://domain.com/jira.](https://domain.com/jira.?) If I remove /Bitbucket then I get an error that the rest api can't be found.

User names are first.last format except for a few local JIRA accounts that don't come from LDAP.


author: Mike Corsaro
body: Got it. Odd -- okay so as a work-around you can still login using your Atlassian Account on the previous screen.

For login, do you normally use "@blah.com" when you login via the Bitbucket Server website?


author: rhopkins76
body: Nope, I just use user.name, same as the account name in Bitbucket. And yeah, I can use the Atlassian work around, maybe create a team account and have all my devs share it, but that kinda defeats the purpose.


author: Mike Corsaro
body: Could you post your sourcetree.log file? That might provide more information. You can find the log in the path:

`C:\Users\<username>\AppData\Local\Atlassian\SourceTree\sourcetree.log`


author: Mike Corsaro
body: Sorry one more thing I've noticed that happens sometimes: when you login and the password prompt opens -- is your username in the first textbox?


author: rhopkins76
body: Yes, the name is already in the box.


author: rhopkins76
body: ERROR \[2018-06-06 15:58:51,328\] \[1\] \[SourceTree.Exceptions.RemoteHostException\] \[.ctor\] - Insufficient authentication credentials  
ERROR \[2018-06-06 15:58:51,328\] \[1\] \[SourceTree.Exceptions.RemoteHostException\] \[.ctor\] - Failed to check login for user \[richard.hopkins\]  
ERROR \[2018-06-06 16:04:00,603\] \[1\] \[SourceTree.Exceptions.RemoteHostException\] \[.ctor\] - Insufficient authentication credentials  
ERROR \[2018-06-06 16:04:00,603\] \[1\] \[SourceTree.Exceptions.RemoteHostException\] \[.ctor\] - Failed to check login for user \[richard.hopkins\]  
ERROR \[2018-06-06 16:06:49,551\] \[1\] \[SourceTree.Exceptions.RemoteHostException\] \[.ctor\] - Insufficient authentication credentials  
ERROR \[2018-06-06 16:06:49,551\] \[1\] \[SourceTree.Exceptions.RemoteHostException\] \[.ctor\] - Failed to check login for user \[richard.hopkins\]  
ERROR \[2018-06-06 16:11:58,117\] \[1\] \[SourceTree.Exceptions.RemoteHostException\] \[.ctor\] - Insufficient authentication credentials  
ERROR \[2018-06-06 16:11:58,133\] \[1\] \[SourceTree.Exceptions.RemoteHostException\] \[.ctor\] - Failed to check login for user \[richard.hopkins\]  
ERROR \[2018-06-06 16:17:07,823\] \[1\] \[SourceTree.Exceptions.RemoteHostException\] \[.ctor\] - Insufficient authentication credentials  
ERROR \[2018-06-06 16:17:07,823\] \[1\] \[SourceTree.Exceptions.RemoteHostException\] \[.ctor\] - Failed to check login for user \[richard.hopkins\]


author: rhopkins76
body: Could be related to this: [https://jira.atlassian.com/browse/SRCTREEWIN-8609?workflowName=SourceTree+Bug+Workflow\&stepId=1](https://jira.atlassian.com/browse/SRCTREEWIN-8609?workflowName=SourceTree+Bug+Workflow&stepId=1)


author: Mike Corsaro
body: Could you set the log to debug level, try to login again, and then post the log?

To do so, open:

```
%localappdata%\SourceTree\app-{version}\log4net.config
```

and set the threshold values to DEBUG (from ERROR). After doing that and uploading the log, make sure you reset that back to ERROR. Thanks!


author: rhopkins76
body: I've tried a bunch of ways to try to get that much text into a post and it always errors. Can't use file sharing by corp policy, so unfortunately I can't.


Tags: bitbucket-server

windows