git 命令
This commit is contained in:
22
git/ssh-key.md
Normal file
22
git/ssh-key.md
Normal file
@ -0,0 +1,22 @@
|
||||
<h1>
|
||||
Git
|
||||
<h3>生成 SSH 密钥</h3>
|
||||
</h1>
|
||||
|
||||
### 先执行以下语句来判断是否已经存在本地公钥:
|
||||
|
||||
```sh
|
||||
cat ~/.ssh/id_rsa.pub
|
||||
```
|
||||
|
||||
### 你可以按如下命令来生成 ssh key:
|
||||
|
||||
```bash
|
||||
ssh-keygen -t rsa -C "service@yinghuainfo.com"
|
||||
```
|
||||
|
||||
### 用以下命令获取你生成的公钥
|
||||
|
||||
```bash
|
||||
cat ~/.ssh/id_rsa.pub
|
||||
```
|
Reference in New Issue
Block a user