自2016年2月起,您不再需要切换到https.
您可以在…端口443(通常为https事务保留的端口)上的ssh中推送到GitLab
GitLab.com运行第二个SSH服务器,该服务器侦听常用的端口443,该端口不太可能被防火墙.
All you have to do is edit your ~/.ssh/config and change the way you connect to GitLab.com.
The two notable changes are Hostname and Port:
Host gitlab.com
Hostname altssh.gitlab.com
User git
Port 443
PreferredAuthentications publickey
IdentityFile ~/.ssh/gitlab
[您可能需要更改远程原始URL:
git remote set-url origin altssh.gitlab.com:user/myrepo.git
]
The first time you push to altssh.gitlab.com you will be asked to verify the server’s key fingerprint:
The authenticity of host '[altssh.gitlab.com]:443 ([104.208.154.249]:443)' can't be established.
ECDSA key fingerprint is SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw.
Are you sure you want to continue connecting (yes/no)?
That’s only normal since you are connecting to the new loadbalancer. If you watch closely, the 07001.