SourceTree: Running with multiple usernames on HTTPS, passwords not persited?

I have configured 5 repositories that belong to 2 different users (some of them are my private ones, others are related to the company I work for)

Starting up SourceTree it keeps asking for the passwords for both users frequently.

How can this be solved?

BTW: The boxes "Saved passwords" and "Default user names" on panel Athentication in the Options menu remain emtpy. Am I doning something wrong?

HTTPS login is prefered

2 answers

1 accepted

Problem solved: I just removed a Git Extensions installation from my machine.

After that I got prompted for the password once more. Typing it in resulted into an entry on menu Tools/OptionsAuthentication. Looks as there was some kind of interference between SourceTree and Git Extensions, so never run them both on a single machine.

How odd, I still have Git Extensions installed on my machine (it's what I used before SourceTree was complete enough for me to move to it for developing itself) and I don't have that problem - but if it's installed an authentication hook then it's possible that was the issue, maybe if you were sharing the git install between them.

If you have multiple users on the same host, then make sure you include the username in the URL, ie something like:

https://myuser@hostname.com/path/to/repo

and not:

https://hostname.com/path/to/repo

The problem is that in order to look up a saved password, SourceTree needs both the username and the host name. If you don't specify the username in the URL, then SourceTree tries to help by using a default, which is the last one you used for that host. However if you have multiple usernames on one host then some of the time this default username is going to be wrong, and then you'll get prompted for the login details again. By being specific about the username in your URL you can eliminate that ambiguity.

I already found this advice in Q&A and followed this for all of my repositories. But I still get prompted for the passwords frequently :-(

Is it ok that there is no saved password / default user names entry under menu Options / Authentication?

Talking about using the last user name as a default: I get always prompted for the passwords of both of my users and I get prompted in the same order always, even if I try to skip the second user. Doing this I'd expect that SourceTree knows the first user as lbeing the last user next time ...

More over my colleague having just on user but 2 repositories get's also prompted for his password frequently.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

794 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you