无法在不同 git 个帐户之间切换
Failed to switch between different git accounts
我关注了 http://mherman.org/blog/2013/09/16/managing-multiple-github-accounts/#.WNGAW3QrLdR 并且非常确定我正在使用我新生成的 ssh 密钥。
当我执行 ssh -T personal
时,弹出 Hi XXX! You've successfully authenticated, but GitHub does not provide shell access.
。
但是当我 git 推送时,它仍然显示 github 提交来自我的工作帐户,与我的工作电子邮件相关联。你知道问题出在哪里吗?
提前致谢!
谢谢拉斯克斯!
检查 git config --get user.email
它应该指向我的个人电子邮件,所以我通过 git config --local user.email my@personal.email
修复了它
我关注了 http://mherman.org/blog/2013/09/16/managing-multiple-github-accounts/#.WNGAW3QrLdR 并且非常确定我正在使用我新生成的 ssh 密钥。
当我执行 ssh -T personal
时,弹出 Hi XXX! You've successfully authenticated, but GitHub does not provide shell access.
。
但是当我 git 推送时,它仍然显示 github 提交来自我的工作帐户,与我的工作电子邮件相关联。你知道问题出在哪里吗?
提前致谢!
谢谢拉斯克斯!
检查 git config --get user.email
它应该指向我的个人电子邮件,所以我通过 git config --local user.email my@personal.email