![06.png](http://upload-images.jianshu.io/upload_images/3701654-91ef2e2e7f290cab.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
### 1.在命令中输出`cd ~/ssh`出现`No such file or directory`,表示不存在ssh文件
~~~
cd ~/.ssh
~~~
![06.png](http://upload-images.jianshu.io/upload_images/3701654-dbade83401ca13ab.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
### 2.在命令行中输入,生产ssh
~~~
ssh-keygen -t rsa -C 395775347@qq.com
~~~
![06.png](http://upload-images.jianshu.io/upload_images/3701654-809404bccf45f8dc.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
### 3.生成的文件在如上图所示,将`id_rsa.pub`的内容粘贴到下图的`Key`中
![06.png](http://upload-images.jianshu.io/upload_images/3701654-97286addb503e76d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
### 4.点击setting-SSH将上图公钥的内容粘贴进[key]()里面
![06.png](http://upload-images.jianshu.io/upload_images/3701654-5a03aeee7016c30a.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
### 5.以后clone的项目使用SSH就不用输入用户密码了