簡體   English   中英

ssh:連接到主機 github.com 端口 22:連接超時致命:無法從遠程存儲庫讀取

[英]ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from remote repository

所以當我試圖從我公司的網絡克隆一個 repo 時,我遇到了這個錯誤,我假設有防火牆阻止了該端口。

user@host:~/test_dir$ git clone git@github.com:master/migration.git
Cloning into 'migration'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我從這篇文章https://stackoverflow.com/a/54191729/4175957測試了解決方案,該解決方案是將以下行添加到~/.ssh/config文件中:

Host github.com
  Hostname ssh.github.com
  Port 443

它沒有用。 我試圖找到的每個答案都說要做同樣的事情,我還沒有找到任何其他解決方法。

有任何想法嗎?

我確認公司網絡默認阻止任何出口 SSH 查詢(以避免加密通量)

我只能在公司環境中將 HTTPS URL 與 github.com 一起使用。
因此,這將是官方的解決方法。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM