how to log out of one Github account and use another account?

后端 未结 2 1396
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-01 12:52

I was using another github account to practice, and now I set up my own github account. I will be primarily using my own account from now on. My problem is that my computer

2条回答
  •  误落风尘
    2020-12-01 13:33

    Thanks David Condrey.

    For anyone having the same issue on Windows 10, the following worked for me. Only slightly different to the Apple Mac answer.

    Using the git bash shell / command line, start an editor:

    git config --global --edit
    

    I had only a [user] section in this file. Your's may be different.

    Add the following credential section and single line entry to the end of the file:

    [credential]
      useHttpPath = true
    

    Note it's credential, not credentials.

    You don't need the helper = osxkeychain line, which is for Apple Macs.

    Save and Exit the editor.

    Now when you 'git push', a login dialogue window appears (but may be in the background). The Octocat icon appears in the taskbar.

    .

    PS: Later, I found this had added a line to the global config and that the following command can be used instead:

    git config --global  credential.usehttppath true
    

提交回复
热议问题