Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.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
Ssh git提交其他github电子邮件?_Ssh - Fatal编程技术网

Ssh git提交其他github电子邮件?

Ssh git提交其他github电子邮件?,ssh,Ssh,我建立了一个工作和个人github帐户。为了区分它们,我在~/.ssh中创建了一个配置文件: Host workusername.github.com HostName github.com PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa Host personalusername.github.com HostName github.com PreferredAuthentications publickey Use

我建立了一个工作和个人github帐户。为了区分它们,我在~/.ssh中创建了一个配置文件:

Host workusername.github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa

Host personalusername.github.com
HostName github.com
PreferredAuthentications publickey
User personalusername
IdentityFile ~/.ssh/id_rsa_personalusername
我保存了配置并输入了

git config user.name“personalusername”

令我沮丧的是,我看起来像:

personalusername <workemail>
personalusername

git用户名与我在github.com设置中指定的用户名不关联。

git config user.email personalemail。关闭终端并再次打开