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
Github ssh添加:如何永久添加ssh密钥_Github_Ssh_Ssh Keys - Fatal编程技术网

Github ssh添加:如何永久添加ssh密钥

Github ssh添加:如何永久添加ssh密钥,github,ssh,ssh-keys,Github,Ssh,Ssh Keys,我正在使用Ubuntu12.04,每次重新启动机器时,ssh add保存的密钥标识都会消失 ~$ ssh-add -l The agent has no identities. 我已经在我的.ssh/config文件中添加了“IdentityFile”,如下面的帖子所示,但它不起作用 我的.ssh/config文件如下所示: Host github-user-1 HostName github.com IdentityFile ~/.ssh/id_rsa.git.user-1

我正在使用Ubuntu12.04,每次重新启动机器时,ssh add保存的密钥标识都会消失

~$ ssh-add -l
The agent has no identities.
我已经在我的.ssh/config文件中添加了“IdentityFile”,如下面的帖子所示,但它不起作用

我的.ssh/config文件如下所示:

Host github-user-1
    HostName github.com
    IdentityFile ~/.ssh/id_rsa.git.user-1
    User git
    IdentitiesOnly yes

Host github-user-2
    HostName github.com
    IdentityFile ~/.ssh/id_rsa.git.user-2
    User git
    IdentitiesOnly yes