Checking for existing SSH keys

Before you generate an SSH key, you can check to see if you have any existing SSH keys.

查看你的ssh key

cd ~/.ssh && ssh-keygen

Generating a new SSH key and adding it to the ssh-agent

After you've checked for existing SSH keys, you can generate a new SSH key to use for authentication, then add it to the ssh-agent.

如果上一步没有的话,就要自己去生成一个ssh-key(待续)

Adding a new SSH key to your GitHub account

To configure your GitHub account to use your new (or existing) SSH key, you'll also need to add it to your GitHub account.

粘贴上一步的ssh-key(通过如下命令,key直接出线在黏贴版中)

  • On OS X run: cat id_rsa.pub | pbcopy
  • On Linux run: cat id_rsa.pub | xclip
  • On Windows (via Cygwin/Git Bash) run: cat id_rsa.pub | clip

进到github中的setting,添加你的ssh-key

Testing your SSH connection

测试连接,以fakestmp为例

git clone git@github.com:Nilhcem/FakeSMTP.git