问题:gitlab 拉取文件是报错:
ssh: connect to host xxx.xxxxxxxx.xxxxx port 22: Connection refused
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
问题分析:
报错显示gitlab服务器22号端口拒绝连接,而服务器ssh连接端口为xxxx,因此需要修改默认端口号
问题解决:
编辑用户家目录下.ssh/config 文件
[root@xxxx]# cat ~/.ssh/config
Host xxx.xxxxxxxx.xxxxx
HostName xxx.xxxxxxxx.xxxxx
Port xxxx