SourceTree won't change Username to push

Hi There,

I have a simple but bugging problem: I fisrt tried to push files into a Git repository from my SourceTree, but mistyped my Username. Now SourceTree won't allow me to change the incorrect Username when I try to push my work into my Git repository, and so the files will not push.

Thanks in advance!

8 answers

1 accepted

Accepted Answer
14 votes

Did you try the "Authentication" tab under Tools>Options, you can modify information of saved users there.


Yes! That was it... Thanks!

Good approach. The only thing is it doesn't let you save the password there in-place. You have to wait for the login prompt to appear.

Either this is the answer for Windows or it's for older SourceTree versions. On Mac, I had to go to SourceTree | Preferences and select the Network tab.

is there a way to manually add another user to SourceTree? I have many different users for GitHub and I need to be able to chose which user to use for a repo.

Doesn't work for me. I've so far found no way to restore my correct username. Under Tools->Options->Authentication, both the Saved Passwords and Default User Names are empty - all deleted. I updated the global but it is nowhere to be seen. When I try to Pull the current branch, I get the Authenticate dialog with username "git" which cannot be altered, along with a password entry box.

BTW, the command line works fine. "git fetch origin" and "git pull" complete without error.

1. Under the Source Tree menu, select menu item 'Preferences'

2. Select 'Network' tab

3. Select the hostname you wish to edit

4. Click the 'Edit' button and change the incorrect username.

5. Done!

ThankYouThankYouThankYou! =]

This should be the accepted answer.

This worked for me, I was very annoyed and always getting an "Authentication problem bla bla bla..." and didn't notice that the user was wrong.

OK-- I figured out at least my problem. There's a little settings button in the upper right of the window. Clicking that let me reset the creds.

Screen Shot 2016-06-22 at 5.44.09 PM.png

This is actually the only way that to fix it on the Mac, now in 2016. 

Please reset the global settings by running:
git config --global "NewUserName"
git config --global ""
After that, restart soruce tree to check if it works.

Hi Harry,

Thanks for your answer - I changed my username in global settings as you suggested (from my SourceTree terminal), and I checked using

git config --list

that it did indeed change. I restarted both SourceTree and my computer.

However, when I drive the "push" command, and SourceTree asks me for authentication, I am stuck with the old username, and my work still won't push :S

I also tried changing username "locally" with

git config "NewUserName"

with the same result.

Your tip was the fix for me, thanks.

In Options -> Authentication, there is a second set of usernames as "default user names". The misspelled one is there. Select and delete it, then the next time you push/clone/etc, you will be reprompted for the username again.

macOS Sierra: 

sourcetree 2.6.3


  - sourcetree

    - preferences 

      - advanced (far right) 


then remove (you can't edit passwords) the account where the credentials has changed. 


Go to Tools > Options, choose Authentication tab, enter password in password field to reset.

I'm guessing that many/all of these suggestions (aside from the command line ones) are for the Windows client. E.g., I don't see menu options such as "Tools" with the Mac client.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published 8 hours ago 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...

54 views 0 1
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