https://www.cnblogs.com/popfisher/p/5731232.html
1.如何生成ssh公钥
- 使用git brash 客户端按如下命令来生成 sshkey:
ssh-keygen -t rsa -C "xxxxx@xxxxx.com"

2.git服务器添加ssh密钥
- GitHub添加SSH key的方式如下图所示:

3.修改config文件
- 文件地址:C:\Users\Poplar.ssh\config
- config内容:
#gitlab company
Host gitlab.9ijx.com ##可以随意命名
HostName gitlab.9ijx.com
User sky
Port 22
IdentityFile ~/.ssh/id_rsa
#github
Host github.com ##可以随意命名
HostName github.com
User sky
Port 22
IdentityFile ~/.ssh/id_rsa_github
#gitee
Host gitee.com ##可以随意命名
HostName gitee.com
User sky
Port 22
IdentityFile ~/.ssh/id_rsa_gitee
4.clone远端仓库源码
- 拷贝git服务器上项目ssh地址
- git brash客户端执行命令:
git clone git@gitee.com/AAAAAAAA.git
本文介绍如何生成SSH密钥、将密钥添加到Git服务器,并通过配置config文件简化多个Git服务器的操作流程。此外,还提供了从不同Git平台克隆项目的具体步骤。

6万+

被折叠的 条评论
为什么被折叠?



