github icon indicating copy to clipboard operation
github copied to clipboard

Can not log out or switch user to push updated files

Open ghost opened this issue 7 years ago • 12 comments

@cryptopool-builders commented on Sep 14, 2018, 10:22 PM UTC:

Description

I was initially using Atom with my personal github account and had no issues pushing files. I am now using my business github account and when trying to push the changes I get an error message remote: Repository not found.

I am assuming this is due to the fact the on the Git tab Atom is logged in with my old account information.

I have tried uninstalling Atom and deleting every dang atom folder that I can find on my PC. And I have tried various suggestions on other tickets and it will not log me out.

I am on windows 10 and using version 1.30.0

This issue was moved by rsese from atom/atom#18055.

ghost avatar Sep 14 '18 22:09 ghost

Thanks for the report - the GitHub package uses whatever credential helper you're using on your system so I'm guessing you have the same problem from the command line?

You can edit/delete your saved credentials on Windows in Credential Manager under Windows Credentials > Generic Credentials I believe. Do you see any github.com entries there?

rsese avatar Sep 19 '18 00:09 rsese

You can also run the GitHub: Logout command from your command palette to clear the credentials you've used in the GitHub pane, although you will also need to follow @rsese's instructions too to clear your token from git's cached credentials.

smashwilson avatar Sep 19 '18 17:09 smashwilson

I've just login in github using atom (not my pc) then wanted to logout and didn't find a button to do so.

I think than and exit action must be present somewhere in order to blank own credentials.

mcanepa avatar May 23 '19 17:05 mcanepa

I did it by going to https://github.com/settings/applications and revoke authorisation for Atom.

mvuksanovic avatar Sep 18 '19 20:09 mvuksanovic

Hi guys,

I have the same need - I would like to switch between several accounts, my personal and my employer's accounts. I did what mvuksanovic suggested but it only partially worked for me - I was successfully able to create a repository under the correct account. However, it was created by my past log-in. I have done everything short of a fresh atom installation, since that is not a feasible solution for me anyway as I need to do this on a daily basis. OP - have you found a work around this yet?

T-T-dev avatar Mar 30 '20 02:03 T-T-dev

... so a bit more information on my issues - I hope it helps others. I am able to change the credentials correctly in the "GitHub" tab within Atom, but not the "Git" tab. I have attached screenshots of both tabs - you can see by the logo that the both tabs have different users logged in - pretty sure that is our problem.

Screen Shot 2020-03-29 at 7 40 25 PM Screen Shot 2020-03-29 at 7 40 14 PM

T-T-dev avatar Mar 30 '20 02:03 T-T-dev

Hello again everybody, I resolved this by doing the following -

  1. Open Platformio IDE terminal
  2. type the following (obviously change the username ) ----> git config --global user.name "YOUR_USERNAME"
  3. then type the following (obviously change the email ) ----> git config --global user.email "YOUR_EMAIL_ADDRESS"
  4. Close Atom and re-open, and your GIT tab should have switched.

... the above only takes care of the Git tab, now for the GitHub tab.

  1. go to GitHub.com, revoke Atom from the account you wish to remove from Atom, and log out
  2. log into GitHub.com from the account you wish to work with.
  3. In Atom, under the github tab, log in and get a new token.

I do the above 7 steps every time I want to switch between business and work and personal accounts. Somewhat cumbersome, but works for me.

credit - I found the above information here: https://courses.cs.washington.edu/courses/cse154/19su/resources/assets/atomgit/macosx/

T-T-dev avatar Mar 31 '20 15:03 T-T-dev

... the above only takes care of the Git tab, now for the GitHub tab.

Does the GitHub: Logout command not work for you?

smashwilson avatar Mar 31 '20 17:03 smashwilson

The "GitHub: Logout" only successfully logs me out of GitHub, but does not reset the credentials under the Git tab, like this --->

Git_vs_gitHub_tabs

When I made a commit with those two log-ins mismatched, I committed to my personal repository from my work account.

T-T-dev avatar Apr 01 '20 14:04 T-T-dev

#2428 should help manage your git identity (the user.name and user.email config settings that git uses in the metadata of commits you create).

Notice that this is different than:

  • The GitHub account that you've authenticated with on the GitHub tab. This is the account used to make API requests to GitHub, so it influences things like which private repositories you're able to see, and the authorship of review comments. It's also used to fetch and push git changes to https remotes, but only if git doesn't know credentials cached from a different source. (This is what GitHub: Logout resets.)
  • An SSH key that you're using to fetch and push git changes to ssh remotes.

You usually want these three "accounts" to match, but they don't necessarily, and the last one is partially managed outside of Atom's visibility in a way that's hard to sync. I'd love to have a solution that better communicates this.

If anyone else would like to explore an idea to solve this, I'd encourage you to open a feature request to fully think it out :smile:

smashwilson avatar Apr 05 '20 17:04 smashwilson

Hey guys,

I'm having the same problem and it's driving me crazy. I followed all of the steps listed in @T-T-dev post, deleted the gitlab credentials from Windows Credential Manager, used the GitHub: Logout command, and restarted my computer.

The Git window shows the right account thanks to T-T, but I cannot for the life of me get the right account to show on the GitHub window.

Has anyone solved this for Windows 10 on Atom 1.48.0?

pbrady32 avatar Jun 26 '20 16:06 pbrady32

go in github settings and in authentication tab remove acess permission of atom tocken.

go in file>settings>packages in core packages find github and disable it and then enable.

now atom will ask again to login in github.

rst-mnk avatar Oct 14 '22 08:10 rst-mnk