[英]why git clone failed when using HTTPS but succeed using git protocol
[英]Why there is no response using git protocol to clone project?
我嘗試將一個Linux
分支從git://git.kernel.org
到本地機器:
# git clone git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux -b perf/core
Cloning into 'linux'...
但是沒有回應。 使用tcpdump
和Wireshark
檢查捕獲的數據包:
我們可以看到TCP
連接已建立。 但是在客戶端使用git smart protocol
發送請求后,沒有任何響應。
誰能提供一些線索?
更新:
(1)根據@MariaInesParnisari的建議,使用--verbose
標志,但它沒有顯示更多信息:
# git clone git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux -b perf/core --verbose
Cloning into 'linux'...
Looking up git.kernel.org ... done.
Connecting to git.kernel.org (port 9418) ... 147.75.110.187 done.
(2)改為https
協議,它有效:
# git clone https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux -b perf/core --verbose
Cloning into 'linux'...
POST git-upload-pack (gzip 25015 to 12570 bytes)
remote: Counting objects: 5287534, done.
remote: Compressing objects: 100% (807310/807310), done.
我從未設法使用git協議克隆工作:它使用特殊端口9418,它始終被阻止。
只有https正在工作/允許,git和ssh通常被阻止(對於出站連接,因為內部網中的服務器允許ssh)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.