How to delete a github account in terminal

Viewed 22818

I want to delete my original github account in terminal on my mac and switch to a new github account. How can I do that?

3 Answers

To remove Github account from git in mac.

  • Go to Keychain Access.
  • Search "github" in search-bar. You will find a key named something like "Internet Password".
  • Delete this key from Keychain by right click on this key. Make sure that the key has removed from keychain by searching again in search-bar.
  • Also check if you connect your account with ssh then you will find an SHA256 key with noname. Delete that key also.
    (Otherwise when you push your code with your new account, git will use the same SHA key to push which will recognise as your old account and the commit author will show as your previous account author.)

Now go to terminal change your global user.name and user.email with your new account details. Then try to push! it will ask you verify with new account credentials.

Related