Does GitHub work in China?
Mostly yes, but slowly. GitHub is one of the few Western platforms not blocked in mainland China; too much of the Chinese tech industry runs on it. But it's heavily throttled: pages take ten seconds, clones stall mid-transfer, images break, and raw.githubusercontent.com downloads fail outright more often than not. It works at full speed in Hong Kong and Macau. For actual work on the mainland, a VPN routing GitHub through the tunnel turns it from dial-up back into GitHub.
What actually happens when you try
GitHub loads. Eventually. The repo page takes ten seconds, avatars and README images come up broken, and a git clone starts at a decent clip, sags to a few KB/s, and sometimes dies with a reset connection, worse in the evening, better at 7 a.m. The support domains fare worse than the main site: raw.githubusercontent.com, which half the world's install scripts curl from, fails more often than it works, which is why a one-line installer that runs fine at home dies mysteriously in a Shanghai hotel.
Why isn't it just blocked? Because Chinese companies depend on it. GitHub sits in a deliberate grey zone: reachable enough that industry functions, degraded enough that it's painful, with occasional regional interference on top. The result for a visiting developer is the least predictable service in this whole series.
What works without a VPN
- Git over SSH tends to survive better than HTTPS clones. If you're stuck, switching remotes to SSH is the first free fix.
- Shallow clones (
--depth 1) finish where full ones stall. - Gitee, the domestic GitHub, mirrors many major open-source repos at full speed if you just need source.
- VS Code, npm, and PyPI are their own adventure: partially reachable, often via Chinese mirrors. Assume every registry needs either a mirror or the tunnel.
The fix: put GitHub in the tunnel, leave the rest alone
This is the mostly-works case where split tunneling matters most. You don't want a single-switch VPN dragging everything through a foreign server all day, slowing WeChat, Didi, and every Chinese site your work trip depends on, just to make git usable. Traveler's VPN routes per destination: GitHub, raw.githubusercontent.com, npm, and Google go through the tunnel on a private server with an IP only you use, while local apps and Chinese endpoints stay direct. Clones run at normal speed, install scripts stop dying, and nothing else on your machine pays for it. That's the difference between a VPN you toggle in frustration and one you forget is on.
Corporate note: if you're on a company device, your employer's VPN likely already covers this, and mixing personal VPNs with corporate MDM is a conversation with IT, not a download. The personal-device setup is where Traveler's VPN fits.
Frequently asked
Is GitHub blocked in China?
No, and it's one of very few Western platforms that isn't, because Chinese industry depends on it. It is heavily throttled, and its raw-file and asset domains fail frequently, so it often feels blocked in practice.
Why do install scripts and raw downloads fail in China?
Most fetch from raw.githubusercontent.com or GitHub release assets, which are far less reliable than the main site from inside China. Run them through a VPN, or download the files before you fly.
Does GitHub Copilot work in China?
Not reliably without a VPN; its endpoints suffer the same throttling and resets. Through the tunnel it behaves normally.
Should I route everything through a VPN to fix GitHub?
You can, but a split tunnel is better: GitHub and package registries through the tunnel, Chinese apps and sites direct. A full tunnel slows the local half of your work trip for no benefit.