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

Jeremy Marquis December 1, 2017

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
minnsey
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 4, 2017

Hi

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 https://git-scm.com/docs/gitcredentials

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
TAGS
AUG Leaders

Atlassian Community Events