Git SSH Key

   一、设置Git的user name和email:

$ git config --global user.name "hhl_vip"
$ git config --global user.email "hhl_vip@sina.cn"

  二、生成SSH密钥过程:
  1.查看是否已经有了ssh密钥:cd ~/.ssh
  如果没有密钥则不会有此文件夹,有则备份删除
  2.生成密钥:

$ ssh-keygen -t rsa -C “hhl_vip@sina.cn”
按3个回车,密码为空。

Your identification has been saved in /home/tekkub/.ssh/id_rsa.
Your public key has been saved in /home/tekkub/.ssh/id_rsa.pub.
The key fingerprint is:
………………

  在用户目录下(一般在C盘)找到.ssh文件夹,拷贝id_rsa.pub文件内容添加到github.com设置SSH Keys的地方即可。

 

 

posted @ 2015-01-28 20:01  有志竟成  阅读(167)  评论(0编辑  收藏  举报