mynote/git/ssh_key.md
2019-01-30 17:16:51 +08:00

553 B
Raw Blame History

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服务器如githubgitlab

在个人设置界面如gitlab都有如下类似界面

ssh key

在 key中添加 id_rsa.pub文件中的字符串点击保存即可

则该git服务器上的项目都可在本机上通过ssh地址直接pullpush