Github: Can't connect github to atom after name change

Created on 11 Jun 2019  Â·  8Comments  Â·  Source: atom/github

Prerequisites

Description

I can't seem to connect my github to my atom account after changing my username on github.

Steps to Reproduce

  1. Open up the github pannel on atom
  2. Click login
  3. Go on website
  4. Get code from website
  5. Paste in code
  6. Press login

Expected behavior: Able to link github to atom

Actual behavior: Error message popups saying "Could not resolve to a user with the username 'ihaveanotheridentity' "

Reproduces how often: 100%

Versions

Atom : 1.37.0
Electron: 2.0.18
Chrome : 61.0.3163.100
Node : 8.9.3

Additional Information

My old username was "ihaveanotheridentity" and is now "qfaq"


Screen Shot 2019-06-11 at 1 14 28 AM

triaged

Most helpful comment

Had the same problem and solved by manually modifying the git config file by changing the user in the url associated with the project.

:+1: Haven't had a chance to test but it seems like that would work.

Where is the the git config file?

I think they mean changing your remote URL to include your new username using this format: https://[email protected]/username/repo.

If that's the case, you can change the existing remote URL with git rather than editing the config file directly:

git remote set-url origin https://[email protected]/username/repo

Your global .gitconfig file is located in your home directory.

All 8 comments

Thanks for the report! I was able to reproduce by renaming a user account using 1.38.0 on macOS 10.12.6. I revoked the "Atom GitHub Package" and "Atom.io" OAuth apps in account settings and logged in again with the new username, but I still get the error when logging into the GitHub package (also logged out of the GitHub package too).

I wonder if this is a GraphQL issue? x-ref: https://github.community/t5/GitHub-API-Development-and/inconsistent-handling-of-moved-repositories-using-API-v4/m-p/22403 where the same error message is mentioned.

I'm having the exact same issue unfortunately.

I've also removed the "Atom GitHub Package" and "Atom.io" OAuth apps from my GitHub settings, along with logging out of the GitHub desktop app for MacOS, and generated a new token using the github.atom.io/login. It's still giving me the error Could not resolve to a User with the username 'previousUserName'.

Had the same problem and solved by manually modifying the git config file by changing the user in the url associated with the project.

Where is the the git config file?

Had the same problem and solved by manually modifying the git config file by changing the user in the url associated with the project.

:+1: Haven't had a chance to test but it seems like that would work.

Where is the the git config file?

I think they mean changing your remote URL to include your new username using this format: https://[email protected]/username/repo.

If that's the case, you can change the existing remote URL with git rather than editing the config file directly:

git remote set-url origin https://[email protected]/username/repo

Your global .gitconfig file is located in your home directory.

That worked for me! Thanks @rsese 🥇

@rsese When I type in git remote set-url origin https://[email protected]/qfaq/repo I get fatal: No such remote 'origin'. Any Idea why?

Actually I got it. If you just go to the project inside of atom, you can edit it through the config folder.
Images

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benogle picture benogle  Â·  4Comments

smashwilson picture smashwilson  Â·  4Comments

move[bot] picture move[bot]  Â·  3Comments

joshaber picture joshaber  Â·  4Comments

danielbayley picture danielbayley  Â·  5Comments