Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Wrong username for Github when attempting to push

Robbie Mitchell June 11, 2012

Hi team,

I've entered my account correctly here: http://cl.ly/0K1N0Y0S010i2q1L170j

But every time I try to push to a repo on my account, SourceTree prompts for a password using a different (incorrect) username: http://cl.ly/3Z270g3J2s1a203y2K0J - yielding this error: http://cl.ly/1c3D0s0z1G0d0n381E2v

Why does it keep asking for "robbie" instead of "superstrong", and how do I fix it?

Thanks!

1 answer

0 votes
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2012

That password prompt is actually not from the 'hosted projects' API call, it's from an actual git call (the prompts are slightly different because of the way the authentication has to be hooked in), which means it's getting that username from a remote URL that's configured in one of your repos. The remote URLs that you have set up in your repos can be different to the one you have set up for the hosted projects window, because remote URLs are completely free-form. So please check the 'Settings' option (top right on the toolbar) for the repo you're interacting with, I'm guessing it either has 'robbie' in the URL or no username at all and is defaulting to that. You shoudl then be able to fix it by correcting the URL.

Deleted user April 5, 2014

Hey!

I'm having my repo set up to different remotes, bitbucket and github. The usernames for each account are different, yet sourcetree is prompting me to log in to github's remote with bitbucket's username (the username is grayed out). The usernames are correct under remote settings though.

Win7/Sourcetree 1.4.1.0

Thanks in advance!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events