daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Dec 10th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #### 1.生成公钥
  2. ```
  3. ssh-keygen -t rsa -b 4096 -C "your_email@example.com" -f ~/.ssh/github_id_rsa
  4. ```
  5. #### 2.配置
  6. 在`config`文件添加配置(没有config文件则新建):
  7. ```
  8. # github
  9. Host github.com
  10. HostName github.com
  11. PreferredAuthentications publickey
  12. IdentityFile ~/.ssh/github_id_rsa
  13. ```
  14. ### 3.添加公钥
  15. 复制`~/.ssh/github_id_rsa.pub`内容在`github`上添加公钥
  16. ### 3.测试公钥
  17. ```
  18. ssh -T git@github.com
  19. ```
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top