簡體   English   中英

Gitlab - 無法推送到存儲庫只是掛起

[英]Gitlab - Couldn't push to Repository just hangs

無法推送到主控,控制台只是凍結而沒有任何響應。 只有在運行之后

git config --global http.postBuffer 524288000

git push工作正常。

雖然設置似乎是一次,但下次使用git push時會遇到同樣的問題。 有替代解決方案嗎? 為什么會突然發生這種情況?

編輯:

OpenSSH_7.9p1, LibreSSL 2.7.3 debug1: Reading configuration data /Users/name/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 48: Applying options for * debug2: resolving "gitlab.com" port 22 debug2: ssh_connect_direct debug1: Connecting to gitlab.com [2606:4700:90:0:f22e:fbec:5bed:a9b9] port 22. debug1: Connection established. debug1: identity file /Users/name/.ssh/id_rsa type 0 debug1: identity file /Users/name/.ssh/id_rsa-cert type -1 debug1: identity file /Users/name/.ssh/id_dsa type -1 debug1: identity file /Users/name/.ssh/id_dsa-cert type -1 debug1: identity file /Users/name/.ssh/id_ecdsa type -1 debug1: identity file /Users/name/.ssh/id_ecdsa-cert type -1 debug1: identity file /Users/name/.ssh/id_ed25519 type -1 debug1: identity file /Users/name/.ssh/id_ed25519-cert type -1 debug1: identity file /Users/name/.ssh/id_xmss type -1 debug1: identity file /Users/name/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_7.9

您看到的是某種網絡問題。 您可以連接到遠程系統,但無法讀取遠程端的版本字符串,這是它作為 SSH 協議的一部分發送的第一件事。

您的系統上可能存在阻止數據發送或接收的某些東西,或者您的網絡上存在某些東西導致了這種情況。 您的 OpenSSH 版本字符串看起來像是在 macOS 上,因此您應該檢查防火牆配置。 如果您在系統上安裝了防病毒軟件,請將其刪除,然后重新啟動。 某些網絡會阻止 SSH,因此這也可能是問題所在。 如果嘗試ssh git@github.com沒有掛起,那么這可能是因為您的網絡破壞了 IPv6 支持或破壞了路徑 MTU 發現,在這種情況下,您應該檢查您的路由器。 您可以從另一個網絡嘗試(如果可能的話)並查看是否可以解決問題,在這種情況下,您知道它在您的網絡上。

這里有很多潛在的問題,不可能一一列舉。 更改http.postBuffer絕對無濟於事,因為這對 SSH 根本沒有影響,只會影響 HTTPS 連接,其中服務器或代理已損壞 HTTP/11 支持。 除非你知道你需要它,否則不應該設置它,因為它會導致每個 HTTPS 推送操作,無論多么小,都要分配全部的 memory,所以在幾乎所有情況下,它都沒有任何好處,只會浪費大量的 ZCD6917BF4957F98CDE23 .

您也可以嘗試改用 HTTPS URL。 有時由於某種原因效果更好。

暫無
暫無

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

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