Wrong username for Github when attempting to push

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

This widget could not be displayed.

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.

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
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

877 views 2 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