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.

  • app-release-unsigned.apk is not signed
  • Git error 400 when doing push
  • Eclipse forget my Git password and username everytime after I do a push
  • How do you rename a Git commit pushed to GitHub?
  • How to delete a commit on a git remote?
  • GitHub commits aren't recorded in the 'Your Contributions` calendar
  • This can’t be that hard?


  • Setting up IntelliJ IDEA and Git
  • How to add private github repository as Composer dependency
  • How push Git sub-directory to heroku?
  • POST hook on Bitbucket
  • Remove files from master at github
  • Automatic TOC in github-flavoured-markdown
  • 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.