update team-work
This commit is contained in:
@@ -24,6 +24,36 @@ git config -e [--global]
|
||||
|
||||
```
|
||||
|
||||
|
||||
## 配置git免密提交
|
||||
|
||||
```
|
||||
# 配置远程代码仓库免密提交
|
||||
# 生成密钥对:ssh-keygen -t 指定算法,-C comment -f 指定路径和文件名
|
||||
ssh-keygen -t rsa -C "youremail@domain.com" -f ~/.ssh/fengzhao_git_key
|
||||
|
||||
# 将公钥复制粘贴到代码托管平台上: settings—>preferences->sshkeys
|
||||
vim ~/.ssh/fengzhao_git.pub
|
||||
|
||||
# 修改本地的ssh config文件: 指定访问公司git时,用指定的个人私钥免密登录
|
||||
vim ~/.ssh/config
|
||||
Host git.qh-1.cn
|
||||
HostName git.qh-1.cn
|
||||
User git
|
||||
IdentityFile ~/.ssh/fengzhao_git
|
||||
|
||||
|
||||
# 测试,`@`后面跟上定义的Host
|
||||
ssh -T git@git.qh-1.cn
|
||||
ssh -i ~/公钥文件地址 Host别名 # 如 ssh -i ~/.ssh/work_rsa work.github.com
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## 新建代码库
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user