How do I log in to Sourcetree??
Asked by David Gartner:

Hello,

<br />

I've been using Bitbucket, and want to work with it through sourcetree but I'm running into some issues.

After getting past some non-obvious setup steps (I have to manually install .NET libraries on my own then re-run the sourcetree installer) I try to log into bitbucket server and get an error saying "Invalid URI: The hostname could not be parsed."

I instead tried to log in with an Atlassian account. That also didn't work as it refused to accept my password even after multiple password resets.

How can I use this tool????????


Answers:
author: Mike Corsaro
body: Hello! Re: Bitbucket Server -- what's the URL that you're using for your hosted Bitbucket Server server?

For Atlassian Account, could you try following the steps [listed in this post](https://community.atlassian.com/t5/Sourcetree-questions/Getting-this-error-quot-Something-went-wrong-while-attempting-to/qaq-p/805220)? Thanks!

comments: author: David Gartner
body: the URL is http://local-server-name/  
my username is first.last@company.com  

It seems to break with the '@' in my username. <https://jira.atlassian.com/browse/SRCTREEWIN-7933>

How has this not been addressed in almost a year?


author: Mike Corsaro
body: The @ issue will be fixed in the next release, but for now it should work if you just replace the @ with a _


author: David Gartner
body: if I replace the @ with a _ I get a new error.

"Failed to check login for user \[first.last_company.com\] : You do not have permission to access URL 'http://local-server-name/rest/api/1.0/users/first.last_company.com' please check the user credentials associated with this account. The request returned with status code 'Unauthorized'."

The URL resolves if I enter it into the browser.


author: Mike Corsaro
body: When you visit via your browser, is it "http" or "https"?


author: David Gartner
body: http.

https doesn't resolve.


author: Mike Corsaro
body: Odd -- and when you use your Atlassian Account to login via that option it doesn't work either? Your Bitbucket Server credentials won't work with the Atlassian Account login, you'll need to use or register for an Atlassian Account.


author: David Gartner
body: I can log in with my Atlassian Account after adding id.atlassian.com to my trusted sites in IE. However, I'm trying to find the easiest path to get everyone at my company set up to use Sourcetree. Having everyone create an Atlassian account and set a trusted site in IE seems unnecessary when everything should already be in place to simply log in via bitbucket server.


author: Mike Corsaro
body: We're going to be pushing a (relatively) big update in the next week or so to our beta testers that focuses around user authentication, so keep an eye out for that.

It's very odd that you can't login to Bitbucket Server though. Could you try [this alpha build](https://product-downloads.atlassian.com/software/sourcetree/windows/alpha/SourceTreeSetup-3.0.0-alpha-1716.exe)and see if it addresses your issue? If possible, it would be awesome if you could get logs from your BBS server to see why it's failing to authenticate ?


author: David Gartner
body: The alpha build gives me the same error.

It's complaining that I don't have permission, but it's not clear what I need permission for. I have admin rights on bitbucket, which should be all i need.

Which logs should I be looking for?


author: David Gartner
body: Any update on this?