- 首先 查看gitlab的端口是不是默认的22 ,一般不是
- 修改git 的默认端口
//1 找到ssh的目录
//2 在有公钥的那一层级创建名为config的文件,内容:
host gitlab.xxxx.com
port xxx
//3 设置ssh替换https
git config --global url.ssh://git@gitlab.xxxxx.com.insteadof=https://gitlab.xxxxx.com
//1 找到ssh的目录
//2 在有公钥的那一层级创建名为config的文件,内容:
host gitlab.xxxx.com
port xxx
//3 设置ssh替换https
git config --global url.ssh://git@gitlab.xxxxx.com.insteadof=https://gitlab.xxxxx.com