GitHub in China: Cloning, Raw Files, Pages and Workarounds
GitHub is unreliable on Chinese mobile data and Wi-Fi without a VPN. It isn't fully blocked, but GreatFire's tests show intermittent interference, and users report that raw files, GitHub Pages sites and large downloads can be slow or fail. Set up a roaming eSIM that routes your data abroad, or a VPN, before you fly, and clone the repos you need at home.
Your options
Set these up before you fly.
Before you fly
- Set up a roaming eSIM or a VPN and test it at home. Most VPN websites are blocked in China.
- Clone or pull the repos you need before you leave, so you can keep working if GitHub is slow.
- Download release files and other large files at home. Users report that large downloads from GitHub can be slow in China.
- Plan for your laptop. Hotel Wi-Fi in China is filtered. Use a VPN, or your phone's eSIM hotspot if the plan allows it.
On Chinese networks
GitHub isn’t fully blocked in mainland China, but access is unreliable. GreatFire Analyzer, which tests websites from mainland China, rates github.com as intermittent. Its results for individual GitHub pages are mixed: some load, and others are disrupted or blocked. It also rates raw.githubusercontent.com as intermittent.
In an August 2025 thread on GitHub’s community forum, developers in China described how different parts of GitHub behave on local networks:
| GitHub feature | Typical behavior on Chinese networks | Practical fallback |
|---|---|---|
Web UI (github.com) |
Opens intermittently; pages can stall or time out | Use a roaming eSIM or VPN |
git clone / git push (HTTPS) |
Often works, but slow or unstable on large repos | Clone repos before departure; try SSH |
| Git over SSH | One forum user reported SSH still worked when HTTPS failed | Add an SSH key before leaving home |
Raw files (raw.githubusercontent.com) |
Rated intermittent by GreatFire; users report ISP-level blocks on raw links | Vendor or cache scripts locally before flying |
| GitHub Pages & Release binaries | Users report slow transfers and timeouts on large downloads | Download release assets at home |
Migaku’s guide for expats in China, updated in May 2026, likewise lists GitHub as slow without a VPN.
The April 2025 China access incident
Separately from Great Firewall interference, GitHub itself briefly cut off signed-out traffic from China on April 12–13, 2025. According to GitHub’s incident report, a configuration change with unintended impact prevented visitors in China who were not logged in from accessing github.com. Signed-in accounts continued working, and GitHub rolled back the change. Staying signed in to your GitHub account avoids anonymous-traffic edge cases if a similar change happens again.
Local alternative: Gitee
If you need a mainland-accessible mirror for open-source or personal repositories, Gitee (run by OSChina, with over 14 million developers according to Gitee) operates inside China without firewall interference. For broader developer workflows — including npm mirrors (npmmirror), PyPI mirrors (TUNA, USTC), Docker Hub, AWS and Azure — see our Coding in China hub.
With a roaming eSIM or VPN
An eSIM that routes your data abroad takes it out of mainland China before it reaches the internet, so your GitHub traffic isn’t filtered. If your plan uses a mainland Chinese connection, GitHub behaves as it does on Chinese networks. A VPN gets your traffic out of China on any connection, including hotel Wi-Fi, but China disrupts VPN traffic, so connections can drop or slow down. On a laptop, use a VPN, or your phone’s eSIM hotspot if the plan allows it. See eSIM or VPN for China and VPN for hotel Wi-Fi in China.
FAQ
Is GitHub blocked in China?
Not fully. GreatFire Analyzer, which tests websites from mainland China, rates github.com as intermittent. In its tests, some GitHub pages load and others are disrupted or blocked.
Does git clone work in China?
Often, but not reliably. Users on GitHub's community forum say they can normally clone and push, but it can be slow or unstable. One user says Git over SSH may still work when HTTPS fails. For work that can't wait, use a roaming eSIM that routes abroad or a VPN.
Has GitHub itself blocked users in China?
By mistake, in April 2025. A GitHub configuration change with unintended impact stopped some visitors from China who weren't signed in from reaching GitHub.com on April 12 and 13. Signed-in users could still use it, and GitHub reversed the change.
Do I need a VPN for GitHub in China?
Not always, since GitHub isn't fully blocked. It's often slow or cut off on Chinese networks, so if you need GitHub for work, set up a roaming eSIM that routes abroad or a VPN before you fly.
Add your report
Takes 20 seconds. We review every report.
Sources
- Access from China temporarily blocked for users that were not logged in (GitHub status page), April 2025
- Can China directly access GitHub? (GitHub Community forum, user answers), August 2025
- github.com test history (GreatFire Analyzer), accessed Oct 8, 2026
- raw.githubusercontent.com test history (GreatFire Analyzer), accessed Oct 8, 2026
- Living Behind the Great Firewall: VPN and Internet Reality for Expats in China (Migaku), May 2026
- About Gitee (Gitee, in Chinese), accessed Oct 8, 2026
- Stay connected in China: is a VPN required? (Airalo help center, sells eSIMs), accessed Oct 9, 2026
- Can I use tethering (Personal Hotspot)? (Airalo help center, sells eSIMs), accessed Oct 9, 2026