参考文章:http://blog.csdn.net/wklken/article/details/9076621
本身我已经有github账号了,fork了参考文章作者的vim配置,准备配置vps上linux的vim。
vps上的linux 版本是 debian 利用下面命令安装git
sudo apt-get install git-core
------------------------------------------
配置linux上的github ssh
1.创建密匙
$ ssh-keygen -t rsa -C "your_email@youremail.com"
# Creates a new ssh key using the provided email Generating public/private rsa key pair.
Enter file in which to save the key (/home/you/.ssh/id_rsa):
现在你可以看到,在自己的目录下,有一个.ssh目录,说明成功了
2.输入你在github上设置的密码
Enter passphrase (empty for no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]
3.添加SSH公钥到github
打开github,打开设置,找到 ssh keys选项 添加新ssh key 添加idrsa.pub中的内容到key里面
4.上面就完成配置,当出现
Enter passphrase for key '/root/.ssh/id_rsa'
时,输入github上设置的密码即可