Hi, I have incorrectly typed my username while i was doing a pushing to a Git Repo.
I am now staying at the popup 'Password Required' For user xxx on host github.com.
I cannot provide the correct credential as the username is incorrect. But I can find nowhere to change this saved username.
I am stuck... may be it is a numb question as I am new to SourceTree ( and quite new to Git also ). Can anyone give me any hints?
After several attempts over time, I managed to solve it accidentally. Not sure if it is after some updates or settings.
I would suggest anyone who has the similar problem to take a look for preference -> Network and see if the usernames there would give you some help.
Old thread but this worked for me too. I kept thinking it was a problem with the password because of the fact that SourceTree also won't accept the passphrase for my Putty default_rsa.ppk private key. I verified I'm entering the right one by using PuttyGen to load it and finally gave up and removed the passphrase with PuttyGen. But the problem with the repo login was not the password it was that it was using the wrong username (my email address). So fixed that as noted here under Tools->Options->Authentication. Didn't work when I tried to change it under Repository Settings. It will never remember the username I put there. Like it just ignores it and even opening the dialog again just shows a blank username again.
I could authenticate in SourceTree > Tools > Options > Authentication
When pushing, I got a greyed-out and incorrect username prompting for password.
Turns out this username was stored in this file:
Just delete or edit that file.
Contained something like:
Thanks Colin for your answer. No luck, my config file looks like this:
repositoryformatversion = 0
3 filemode = false
4 bare = false
5 logallrefupdates = true
6 ignorecase = true
7 [remote "origin"]
8 fetch = +refs/heads/*:refs/remotes/origin/*
9 url = https://github.com/xxxxxx
10 [branch "master"]
11 remote = origin
12 merge = refs/heads/master
13 [branch "server-edition"]
14 remote = origin
15 merge = refs/heads/server-edition
Oh I see, in that case if you overtype the username and the login succeeds, it should have saved that username as the new default to use.
One way to guarantee fixing this is to be unambiguous in the URL you use for the remote. So for example instead of using https://domain.com/my/repo, if you use https://firstname.lastname@example.org/my/repo instead then the username is guaranteed to be correct. You can change this by clicking 'Settings' in the repository window toolbar (top-right) and editing the remote URL.
If the user is not present in the URL, SourceTree uses a default which *should* be based on whatever the last successful login was. If after you overtype the username and login successfully it comes back with the previous default next time, that's a bug but I'm not sure how it can happen right now.
I tried to change it to https://username@domain....
It is using my specified 'username' right now.
However, the next time I come back. The default username remains unchanged... I may need to change the url manually everytime I push updates.
Seems a workaround at the moment though. Thanks
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 ...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot