Can I configure SourceTree to prompt for user credentials on start or activity?

I have client computers that I want to require the entry of user name and password before they can interact with the remote.  I want it to be one of our developers who does any pushing/pulling, not a lab tech.  Ideally, they also could not "add a new repo" and see the list of repos (my other clients) on Bitbucket.  If there is a better approach I am open to it.

1 answer

0 votes


I'm assuming this is Sourcetree for Windows and that Sourcetree does not provide the kind of fine grained control you are looking for.

If you delete any Accounts in Tools/Options/Authentication then Sourcetree will not be able to list remote repos on Bitbucket.

If you are using private repos anyone trying to push will be prompted for valid credentials, but by default Git will cache those credentials for use the next time.

You can turn off this caching, see

If credential.helper is configured to the empty string, this resets the helper list to empty (so you may override a helper set by a lower-priority config file by configuring the empty-string helper, followed by whatever set of helpers you would like).

This potentially would prevent caching and mean the use is prompted everytime ... but Sourcetree expects the standard git credential manager to be in place and working to manage the credentials. I've never tried this but I suspect it will prevent pushing/pulling from Sourcetree but you might need to switch to the command line when you do actually want to enter credentials and push to the remote.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,205 views 4 2
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