GitHub: Separate credentials for two accounts on Windows

后端 未结 3 1765
忘掉有多难
忘掉有多难 2020-12-10 16:49

I recently created a second GitHub account two separate my work and my private projects (before, I only had the work account). I use https in combination with the Windows cr

3条回答
  •  醉酒成梦
    2020-12-10 17:05

    The conditional include that I detail here is only for commit authorship (user.name/email).

    This has nothing to do with authentication (credentials: username/password)

    Those are probably cached in a credential manager (like the linux osx-keychain)
    Check the output of:

    git config credential.helper
    

    If you can, use instead SSH keys per environment, as I illustrate there: then you can easily maintain different identities for the same remote repo (github.com)


    Note: the GCM (Git Credential Manager) installed alongside Git for Windows does not, as stated in issue 363, support multiple users per Uri.

提交回复
热议问题