简体   繁体   English

我无法从Siteground ssh会话克隆gitlab存储库

[英]I can't clone gitlab repo from siteground ssh session

I created a new project directly in GitLab. 我直接在GitLab中创建了一个新项目。 On my Mac, I did a clone, and found that it communicates with gitlab. 在Mac上,我做了一个克隆,发现它与gitlab通信。 I ssh'd onto my account on SIteground and tried to clone there as well. 我在SIteground上登录了我的帐户,并尝试在该帐户中进行克隆。 I got: 我有:

ssh: connect to host gitlab.com port 22: Connection timed out

Wrong port? 端口错误? Some speecial extra step required? 需要一些特殊的额外步骤吗? Tech support at SiteGround unhelpfully gave me instructions for git HUB, not git LAB. SiteGround的技术支持无助地为我提供了git HUB(而不是git LAB)的说明。 Making the obvious substitution in those instructons resulted in the same error message. 在这些指导老师中进行明显替换会导致相同的错误消息。 They told me to create a ~/.shh/config file containing: 他们告诉我创建一个~/.shh/config文件,其中包含:

Host us16.siteground.us
ForwardAgent yes

I did. 是的 No change in result. 结果无变化。

Ideas? 有想法吗?

GitLab allows connections on port 443 to work around situations like this . GitLab允许端口443上的连接解决这种情况

All you have to do is edit your ~/.ssh/config and change the way you connect to GitLab.com. 您要做的就是编辑〜/ .ssh / config并更改连接到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/id_rsa

SiteGround阻止了端口22进入除白名单地址之外的所有地址,并且未列出gitlab。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM