覆盖Github密钥?

时间:2016-02-03 02:33:22

标签: github ssh-keys git-bash git-shell

我是Github的新手,所以这看似微不足道。我应该为我的Github帐户创建一个ssh密钥。我通过在Git Shell中输入以下命令来做到这一点:

ssh-keygen -t rsa -C "rishikesh.330@gmail.com"

在此之前,我已经从github.com删除了我的ssh密钥,因此在运行上述命令之前,我的Github中没有密钥。在运行上述命令时,生成了一个密钥。当我再次打开github.com时,我看到了一把钥匙,我认为这是一把钥匙。但是,我不小心从github.com删除了该密钥,并添加了我刚刚在Git Shell上创建的新密钥。

这是否意味着我的github.com在线帐户和我的桌面Git Shell / Git Bash现在有两个不同的ssh密钥?如果我打算使用我的Git Bash将内容上传到github.com,我应该担心吗?

1 个答案:

答案 0 :(得分:0)

If you've applied the key, you've applied it to your account. So, if you're using git shell, then you can connect to your account using the ssh key you created in the shell and that you've applied to github by putting in the public part of the key. It doesn't really matter what client you're using to connect. So go ahead. If you need the private key at any stage when you're connecting, use the private part of the key whose public part you added to Github.