Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git显示错误的推送作者,但显示正确的提交作者_Git_Github - Fatal编程技术网

Git显示错误的推送作者,但显示正确的提交作者

Git显示错误的推送作者,但显示正确的提交作者,git,github,Git,Github,我的开发团队正在努力解决这个问题。我的两名团队成员在推送时在我们的旧CTO/开发人员下显示活动,但在提交级别上显示正确的作者 示例(已删除) 我已经解开了胭脂推手的秘密。事实证明,我们的老首席技术官实际上已经将这些密钥添加到了他自己的帐户中,而不是让我们的新开发人员将它们添加到他们自己的帐户中。不太清楚他为什么这么做,但这就是原因 我们无法与他联系并要求他删除密钥,因此我们仅为github创建了一个新密钥,添加了一个按域设置密钥的ssh配置 Host github.com IdentityF

我的开发团队正在努力解决这个问题。我的两名团队成员在推送时在我们的旧CTO/开发人员下显示活动,但在提交级别上显示正确的作者

示例(已删除)


我已经解开了胭脂推手的秘密。事实证明,我们的老首席技术官实际上已经将这些密钥添加到了他自己的帐户中,而不是让我们的新开发人员将它们添加到他们自己的帐户中。不太清楚他为什么这么做,但这就是原因

我们无法与他联系并要求他删除密钥,因此我们仅为github创建了一个新密钥,添加了一个按域设置密钥的ssh配置

Host github.com
  IdentityFile ~/.ssh/just_for_github.key
Host *
  IdentityFile ~/.ssh/id_rsa

嗯,git不会在本地跟踪谁推什么,它只跟踪提交。你指的是GitHub上的日志还是什么?如果是这种情况,GitHub实际上使用您的GitHub帐户的用户名和电子邮件地址来记录提交,这可能与您在本地计算机上的设置不同。例如,当您通过GitHub的web界面而不是git的命令行提交或合并请求时。
Host github.com
  IdentityFile ~/.ssh/just_for_github.key
Host *
  IdentityFile ~/.ssh/id_rsa