update git markdown

This commit is contained in:
light
2017-06-07 14:24:37 +08:00
parent 39e9cab6f7
commit 34bc209e42
6 changed files with 196 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
# 如何迁移git项目
- git remote set-url origin ************(项目地址)
- git push
+17 -4
View File
@@ -1,6 +1,19 @@
# build ssh key
# ssh key 生成和使用
## 生成 ssh key
git config --global user.name 'light'
git config --global user.name '1870499383@qq.com'
ssh-keygen -t rsa -C '1870499383@qq.com'
ssh-keygen -t rsa -C '1870499383@qq.com'
注:连按三下回车,选择默认即可
## key 地址
/.ssh/id_rsa.pub
## 上传key至git服务器,如githubgitlab
在个人设置界面,如gitlab都有如下类似界面
![ssh key](/static/img/ssh_key.png)
在 key中添加 id_rsa.pub文件中的字符串,点击保存即可
则该git服务器上的项目都可在本机上通过ssh地址直接pull,push