Interview Prep/Linux/Networking, DNS and firewalls

`ssh` and `curl` to a remote host work, but `git clone` over HTTPS hangs on large repos only.

AdvancedTroubleshootingNetworking, DNS and firewalls
Answer

Likely causes → A proxy or middlebox timing out long transfers, a broken HTTP proxy setting in git, or a stateful firewall killing long-lived connections.

Diagnose →

git config --show-origin --get-regexp 'http.*proxy'
env | grep -i proxy
GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone https://... 2>&1 | tail -40

Fix → Correct or remove proxy settings, set NO_PROXY for internal hosts, use shallow clones (--depth 1) or SSH transport, and raise idle timeouts on the middlebox.

Prevent → Central, documented proxy config (/etc/environment, systemd Environment=).

All Linux questions Roadmap: Linux

More on Networking, DNS and firewalls