Find Questions…

Close ×
First time here? Check out the FAQ!

How can I stop SourceTree from using a deleted account to try to connect to GitHub

Mark Schaschke asked this question · 1 karma ·

I entered my account details in SourceTree for 2 accounts. The first was set as the default. I could browse repositories using both accounts, however I could not clone any from the second (non-default) account. I deleted the first account and made the second default, however I still have the same problem.

It goes like this - when I select the repository from my list of accessible github repos (it lists them all fine), and return to the 'Clone Repository' screen, the Source Path / URL field has a notice under it: 'This is not a valid source path / URL'. When I click on the 'details' button I get a dialog with:

ERROR: Permission to <repo>.git denied to <username>.

fatal: The remote end hung up unexpectedly

ERROR: Permission to <repo>.git denied to <username>.

fatal: The remote end hung up unexpectedly

abort: repository git@github.com:<repo>.git not found!

ERROR: Permission to <repo>.git denied to <username>.

fatal: The remote end hung up unexpectedly

Where <username> is the first (and now deleted) user and <repo> is the repo I selected from the list.

I am also getting 2 'GitHub API call failed' dailogs popping up every time I try to browse my repositories, both with the same content: 'The operation couldn’t be completed. (SDNetDomain error 7.)' - not sure if this is related.

Thoughts?

Thanks,

Mark

3191 views

One Answer:

Steve Streeting [Atlassian] · 14,675 karma ·

Those errors are normal when you have a GitHub account in the list where the login credentials are incorrect.

However, I can't replicate the issue you have here - I tried creating extra GitHub accounts for which I didn't have the passwords (my friends, so they won't be annoyed by the failed logins!), and got the errors you described. However, I just removed these from the accounts list afterwards and the errors disappeared again, as expected.

Are you sure you confirmed the Edit Accounts dialog with OK after you'd removed the GitHub account?

Mark Schaschke · 1 karma ·

Hi Steve,

Thanks for your response. I have definitely removed the original GitHub account. I also tried removing all the accounts and starting again, with the same result. I wonder if it is something to do with the failing account being the first one added.

I've completely uninstalled the product (removing all the Library/[Caches|Preferences|...] folders I can find), and re-installed, it has no knowledge of any of my accounts, but it is still trying to authenticate with that old username. Very strange. It's also strange that it's using the correct credentials to retrieve the list of repos, but a different set of credentials to clone a specific repo.

Oh hang on, I think I know what it is - I've been using git on the command line and have given GitHub my key. It's trying to use that, which of course doesn't have access to the other user's repo...

Looking for something else?

Find Questions…

or Browse other questions tagged:

or Ask a Question