change github account mac command line

I have two github accounts, one for work one for home. I am working on a personal project and can’t push to origin master because it says I’m still logged in to my work account.

I reset my global user / / / user.token and it still registers my work account.

  • How to recover a deleted remote branch
  • manage git clone on remote server with eclipse
  • How to set up “Drude model” for Gromacs via git
  • why post-merge git hook not running?
  • Github - permission denied to old account
  • First “git push” to remote repository. Can't find where it places the files of the project
  • This can’t be that hard?


  • 'git pull' command work from terminal but not with php shell_exec() via git repository hook
  • Unable to open pull request from fork
  • How can I make sure my commit has really happened?
  • How do I generate the GitHub OAuth token for organization accounts?
  • Is cross-branch reference possible?
  • Git change source of new branch to older commit of source branch
  • One Solution collect form web for “change github account mac command line”

    The GitHub token is only used for non-ssh communications.

    But if you are pushing to GitHub using https address, and still register as your first account instead of the second one, that should mean you don’t refer to the right public/private keys matching your public key on second account.
    See, for instance, the blog post “Quick Tip: How to Work with GitHub and Multiple Accounts”, which manages those public/private keys through a ssh config file:

    #Default GitHub
      User git
      IdentityFile ~/.ssh/id_rsa
    Host github-COMPANY
      User git
      IdentityFile ~/.ssh/id_rsa_COMPANY
    Git Baby is a git and github fan, let's start git clone.