Py学习  »  Git

无法连接到gitlab,连接超时

Aayush Dahal • 3 年前 • 1361 次点击  

我已经在unbuntu上创建了ssh密钥 id_company id_company.pub ,并将配置更新为:

Host gitlab.company.com
  Hostname gitlab.company.com
  #PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_company

现在,我尝试使用以下方法测试连接: ssh -T git@gitlab.company.com ,但我收到了 ssh: connect to host gitlab.company.com port 22: Connection timed out 我不知道是什么原因,还是我做错了什么?

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/132049
 
1361 次点击  
文章 [ 1 ]  |  最新文章 3 年前
VonC
Reply   •   1 楼
VonC    3 年前

首先确保你的 gitlab.company.com 可通过端口22访问服务器:

curl -v telnet://gitlab.company.com:22

我知道在我的公司,永远不会授予SSH访问权限:仅限HTTPS。