Field Notes
Networks, privacy, and travel

GitHub Slow Over VPN? Find the Slow Path Before You Change Servers

It is a familiar paradox at the command line: your browser snaps open GitHub’s homepage without a stutter, a quick bandwidth test reports hundreds of megabits per second, and yet your terminal hangs endlessly on git fetch or crawls at a few kilobytes per second through a clone.

The automatic reaction is usually server roulette. You open your VPN client, disconnect, jump from London to Frankfurt, switch protocols, and run the command again. When that fails, you blame the VPN provider for having slow servers and consider shopping for another subscription.

Laptop terminal stalled during a GitHub clone over a VPN

Stop cycling through server lists.

“GitHub is slow” is almost always too broad a diagnosis. To your web browser, GitHub appears to be a single website sitting at github.com. Under the hood, GitHub is an ecosystem of distinct endpoints, ports, and protocols. The pathway carrying your web traffic is rarely the same pipe handling your Git commands, downloading compiled release binaries, or pulling multi-gigabyte Large File Storage (LFS) assets.

If your VPN seems to choke on GitHub, the quickest fix is not guessing which server is faster. It is pinpointing which specific GitHub path is congested, fixing the transport or workload at that layer, and only touching your VPN connection once the evidence genuinely demands it.

Article summary and product fit

How should you troubleshoot GitHub being slow over a VPN?

First identify the specific slow task, then compare that exact task with the VPN on and off. If only Git transport is slow, test HTTPS versus SSH, including GitHub’s SSH-over-443 endpoint; if only large transfers are slow, reduce the workload before blaming the route.

What matters in this article

  • First test: Time the same repository operation on the same network with the VPN connected and disconnected; a generic speed test does not reproduce the GitHub path.
  • Transport check: A fast github.com webpage does not prove SSH, Git LFS, release downloads, or package endpoints are healthy because they use different protocols and infrastructure.
  • Important limit: Automatic VPN routing cannot fix a GitHub incident, local machine bottleneck, or an unnecessarily huge clone; route changes matter only after those variables are isolated.

Product fit: OnlydogVPN is relevant only when a normal-sized GitHub task is repeatedly fast without the VPN and slow through the protected route across transport tests. Its role is to reduce manual route guessing, not to increase repository efficiency or override GitHub-side problems. OnlydogVPN official website.

Sources already used in this article: GitHub Status, GitHub SSH over port 443, Git clone documentation, Git LFS documentation.

First Ask What “GitHub Is Slow” Actually Means

Before touching a single network toggle, isolate the exact action that is dragging its feet. Most GitHub performance problems fall into four distinct categories:

  • The website itself crawls: Opening repositories, issues, discussions, and pull requests in your browser feels sluggish. This points toward broad DNS resolution delays, general network path congestion, or an issue with GitHub's web frontend.
  • The web interface is fast, but Git commands stall: You can browse commits instantly in Chrome or Firefox, but git clone, git fetch, git pull, or git push hangs in the terminal. The bottleneck is specific to the Git transport layer.
  • Only massive repositories struggle: Smaller utility repos clone in seconds, while the team’s sprawling legacy monorepo grinds to a halt. The issue here is payload size and object calculation, not necessarily network health.
  • Git operations work, but binary assets freeze: Standard commits sync smoothly, but pulling Git LFS objects, downloading release artifacts, or fetching packages from GitHub Packages takes forever.

The distinction matters because GitHub distributes these workloads across different domains and backends. Raw Git operations, release downloads, and LFS blobs often live on distinct content delivery paths. In fact, GitHub’s official status dashboard tracks Git Operations as an entirely separate service component from the web interface or API.

A fast webpage proves that your browser can reach github.com. It proves nothing about how your terminal reaches an SSH gateway or an LFS storage node.

Do One Same-Task VPN Test Before Blaming Bandwidth

Speed tests are useless for diagnosing Git problems because synthetic bandwidth checks test raw throughput to a nearby consumer server, not sustained Git handshakes to GitHub infrastructure.

Instead, run one controlled comparison using the exact task that is misbehaving:

  1. Pick the specific command that is stalling (e.g., git fetch origin main on a specific repository).
  2. Run it with your VPN connected and time it.
  3. Disconnect your VPN, stay on the exact same Wi-Fi or local network, and run the exact same command on the same repository.

Now, interpret the outcome:

  • If it runs slowly both with and without the VPN: The VPN route is innocent. Changing VPN servers is a waste of time. Check the official GitHub Status dashboard first to ensure Git Operations are healthy. If the platform is green, look at local machine resources, local ISP congestion, or repository bloat. GitHub explicitly states that it does not throttle bandwidth on a per-user basis; unexpected slowness that comes and goes throughout the day is almost always general route congestion.
  • If it is fast without the VPN, but repeatedly crawls when connected: You have valid evidence that the active VPN path is impairing this specific task.

Even then, do not immediately assume the entire VPN connection is broken. The next step is checking which door your Git client is using to enter GitHub.

If Only Git Is Slow, Change the Transport Before the VPN

If your browser flies through GitHub but terminal commands crawl, inspect your remote URL. Open your terminal in the repository and run: Bash

git remote -v

Look closely at the beginning of the URL. You are connecting via one of two primary protocols:

  • HTTPS: typically formatted as [https://github.com/owner/repo.git](https://github.com/owner/repo.git), traveling over standard web port TCP 443.
  • SSH: formatted as [email protected]:owner/repo.git, traveling over standard administrative port TCP 22.
Slow clone progress on a laptop with a glowing network tunnel behind it

VPN routes and intermediary firewalls often handle ports 443 and 22 very differently. Many commercial tunnels, corporate networks, and network gateways apply strict inspection, traffic shaping, or suboptimal routing to SSH traffic on port 22 while leaving port 443 wide open.

GitHub’s official connectivity guidance explicitly recommends switching transports when experiencing connection hangs. If you are cloning via SSH on port 22 and hitting a wall, you do not have to abandon SSH authentication or rewrite your workflow to HTTPS. GitHub provides an official alternate endpoint that serves full SSH traffic directly over the standard HTTPS port (TCP 443).

You can test whether this alternative path works right now with a single diagnostic command: Bash

ssh -T -p 443 [email protected]

If that command returns a successful authentication greeting cleanly while your standard SSH connection stalls, you have just solved the problem without touching your VPN client. You can make this permanent by adding a brief block to your local ~/.ssh/config: Plaintext

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

Conversely, if an existing HTTPS remote is hanging due to local proxy or TLS inspection issues inside the VPN tunnel, switching that repository to standard SSH can immediately bypass the stall. The value of switching transports is discovering which protocol path moves freely through the tunnel.

If Only Big Transfers Are Slow, Make the Job Smaller

Sometimes the network is not broken; it is simply carrying an enormous payload over an encrypted hop.

Full Git clones pull down every commit, branch, tag, and file version across an entire project’s history. Over a local fiber line, an uncompressed repository might complete before you notice its weight. Routed through an encrypted VPN tunnel, every round of object negotiation and packet exchange is magnified by the added latency.

Before assuming your VPN cannot handle GitHub, verify whether you actually need the repository's entire historical archive. Git provides lightweight cloning options that dramatically reduce the payload:

  • Shallow clone (recent history only): Bash
git clone --depth 1 <repository-url>

This pulls only the latest commit of the default branch, bypassing years of historical commits and dramatically cutting transfer time.

  • Partial clone (blobless): Bash
git clone --filter=blob:none <repository-url>

This clones the commit tree and history so you can view logs and branches locally, but delays downloading file contents (blobs) until you actually check out the files.

Pay special attention to repositories using Git LFS (Large File Storage). With LFS, Git repositories contain only tiny text pointer files, while large binaries (such as 3D models, dataset archives, or compiled assets) are stored in dedicated cloud object storage and downloaded separately during checkout. If the base Git clone finishes in seconds but the terminal hangs during the LFS phase, the issue is not Git negotiation—it is sustained bulk data transfer from a distinct CDN endpoint.

Trimming unnecessary payloads helps you separate a genuine connection failure from a routine large-file transfer.

When the VPN Really Is the Bottleneck

What if you have tested the variables methodically? GitHub's status is clean, the repository is modest, swapping between SSH on port 443 and HTTPS makes no difference, and yet the same Git command runs instantaneously the moment the VPN is disconnected.

At this stage, you have isolated the real issue: the active VPN path is fundamentally poorly routed to GitHub's infrastructure.

When you connect to a VPN, your traffic takes an extra detour. The data travels from your machine to the VPN exit node, and from that node across the internet backbone to GitHub. A server that is physically close to your living room might look fast on paper, but its upstream routing to GitHub’s edge routers might be heavily congested or poorly peered.

Manual server hopping is an exhausting way to solve this. Guessing whether "Server 14" or "Server 29" has cleaner peering to GitHub's network turns developers into reluctant network administrators.

This is where a client such as OnlydogVPN↗ becomes relevant as a route-level comparison.

Instead of leaving you to endlessly guess among static city server lists, OnlydogVPN is built around automated routing and modern connection resilience. It runs on an HTTP/3-based transport layer designed specifically to thrive over fluctuating, congested, or packet-loss-prone lines. Traditional VPN protocols can suffer severe head-of-line blocking when handling continuous, multiplexed data streams like large Git operations over unstable hops; OnlydogVPN' architecture recovers quickly from packet drops in the background without stalling the entire pipeline.

The value here is not a promise that a VPN will double your ISP bandwidth or shrink a bloated repository. The practical benefit is eliminating the server-guessing game. When you switch on OnlydogVPN, its automatic routing actively finds an unencumbered path that handles both web endpoints and sustained Git operations reliably, keeping terminal friction low.

What I’d Do Next Time

The next time your terminal freezes on a Git push or pull while your VPN is running, resist the urge to randomly bounce between servers. Follow this sequence instead:

  1. Classify the symptom: Is it the web page, the Git transport, a huge repository, or an LFS binary?
  2. Run a clean control test: Test the exact same Git command with the VPN off. If it is still slow, look at local resources and GitHub's status page.
  3. Switch the transport: If the website works but terminal Git stalls, test SSH over port 443 (ssh.github.com:443) or try an HTTPS remote.
  4. Lighten the load: If you are pulling massive codebases, use --depth 1 or --filter=blob:none to confirm whether the payload size is the real culprit.
  5. Upgrade the route: If a normal-sized operation consistently chokes exclusively inside the VPN across all transports, switch to a client like OnlydogVPN that negotiates stable, resilient routing automatically.

Find the slow path first. Once you treat GitHub as a series of distinct network tasks rather than one monolithic site, fixing a stalled terminal takes minutes instead of hours.

Frequently Asked Questions

Why can GitHub’s website be fast while git fetch or git clone is slow?

Because browser pages, Git transports, release assets, and Git LFS can use different endpoints, ports, and backend paths, so one healthy path does not prove the others are healthy.

What is the best first test for a suspected VPN slowdown on GitHub?

Run the exact same Git command against the same repository on the same local network once with the VPN connected and once with it disconnected.

What can I try if SSH on port 22 is slow through the VPN?

Test GitHub’s official SSH endpoint over TCP port 443. If that path works, you can configure SSH to use ssh.github.com on port 443 for GitHub.

What if only very large repositories or Git LFS transfers are slow?

Reduce the job first with a shallow or partial clone and identify whether LFS or another large-asset endpoint is the bottleneck before changing the VPN route.