19 lines
553 B
Markdown
Executable File
19 lines
553 B
Markdown
Executable File
# ssh key 生成和使用
|
||
## 生成 ssh key
|
||
git config --global user.name 'light'
|
||
git config --global user.email '1870499383@qq.com'
|
||
ssh-keygen -t rsa -C '1870499383@qq.com'
|
||
注:连按三下回车,选择默认即可
|
||
|
||
## key 地址
|
||
~/.ssh/id_rsa.pub
|
||
|
||
## 上传key至git服务器,如github,gitlab
|
||
|
||
在个人设置界面,如gitlab都有如下类似界面
|
||
|
||

|
||
|
||
在 key中添加 id_rsa.pub文件中的字符串,点击保存即可
|
||
|
||
则该git服务器上的项目都可在本机上通过ssh地址直接pull,push |