How to add Username


How can I add different user name and password for different different repositary? Can you suggest me on that.



1 answer

Do you mean change the user which is shown in the commits, or change the user/password used to communicate with remotes?

To change the commit user name, click on the 'Settings' button on the right of the toolbar in the repository window. Then change the details in the section 'User Information'.

To change the user/password for a remote, again in the 'Settings' area for that repository, edit the remotes at the top and include the username you want to use in the URL, e.g. https://youruser@host/path/to/repo. SourceTree will prompt you for the password if it doesn't already know it, or if the password is rejected by the server.

THanks for helping but after this I am getting below error while getting Updates from the server:

hg pull --rebase default

abort: outstanding uncommitted changes

Completed with errors, see above

That's a standard Mercurial message - you can't 'pull with rebase' when you have uncommitted changes.

Either commit your changes, or change the 'post pull' option in the Pull dialog to Update instead.

When I have changed Rebase to Update it shows me below alert:

When pulling from Subversion repositories, you must use the 'Rebase' option since Subversion history must remain strictly linear.

The post-pull action will be changed for you when you dismiss this message, submit the dialog again to proceed.

OK, you didn't say you were using Subversion as your remote.

In that case, you must commit your changes before you pull.

Suggest an answer

Log in or Join to answer
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 ...

238 views 0 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot