标签:
cd ~/. ssh 检查本机的ssh密钥
如果提示:
No such file or directory
说明是第一次使用git
生成新的SSH Key:
ssh-keygen -t rsa -C "邮件地址@youremail.com" # -C大写,无需引号 Generating public/private rsa key pair. Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):<回车就好>
然后输入密码,可以回车跳过,密码是防止别人往你的项目中提交内容:
Enter passphrase (empty for no passphrase):<输入加密串>
Enter same passphrase again:<再次输入加密串>
显示成功设置ssh key:
ssh -T git@github.com The authenticity of host ‘github.com (207.97.227.239)‘ can‘t be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? # 直接输入yes Hi cnfeat! You‘ve successfully authenticated, but GitHub does not provide shell access
搞定收工。。。
参考: http://www.jianshu.com/p/05289a4bc8b2
标签:
原文地址:http://www.cnblogs.com/zhanglianbo/p/5648206.html