标签:eve 地址 查看本机 exists gitlab book keygen read sts
### 硬件: MacBook Pro ### 需求: 系统生成Key,并配置到GitLab上 ### 步骤: 1.本地生成ssh公钥和私钥对 2.查看本机ssh公钥 3.在GitLab增加SSH Kyes ------- #### 1.本地生成ssh公钥和私钥对 ``` ssh-keygen -t rsa -C ‘xxx@xxx.com‘ 然后一路回车(-C 参数是你的邮箱地址) ``` ``` Enter file in which to save the key (/Users/steve/.ssh/id_rsa): 回车 ``` 出现: ``` /Users/steve/.ssh/id_rsa already exists. ``` 表示.ssh/id_rsa已经 ``` 输入:y (重新覆盖) 输入:n (不覆盖) ``` 设置你的密码(位数不要太短,尽量设置6位) ![-w399](https://img2018.cnblogs.com/blog/618582/202002/618582-20200229213127981-1178236314.jpg)? #### 2.查看本机ssh公钥 ``` cat ~/.ssh/id_rsa.pub ``` ![-w567](https://img2018.cnblogs.com/blog/618582/202002/618582-20200229213130428-1950492944.jpg)? #### 3.在GitLab增加SSH Kyes ![-w976](https://img2018.cnblogs.com/blog/618582/202002/618582-20200229213131508-1929140669.jpg)?标签:eve 地址 查看本机 exists gitlab book keygen read sts
原文地址:https://www.cnblogs.com/zhuyuliang/p/gitlab-pei-zhissh-key.html