What Smart HTTP is
When running git clone over HTTPS, the Git client issues two kinds of requests: first GET /info/refs?service=git-upload-pack to learn which refs (branches, tags) the server has, then POST /git-upload-pack to negotiate and fetch the needed objects. This flow is called Smart HTTP and is the basis of HTTPS clones, shallow clones and incremental fetches.
How the gateway forwards clone requests
The gateway performs read-only transparent forwarding for both request types: it does not parse pack contents and streams request and response bodies; the Cookie and Authorization headers are stripped, so account credentials never enter the relay. Therefore:
- Clones, shallow clones and incremental fetches all work through the accelerated address
- Push (
git-receive-pack) is a write operation and is rejected outright - Private repositories are out of scope (they need login state, which conflicts with the no-credentials principle)
Cloning large repositories faster
The larger the repository, the more objects the first clone must fetch. Three techniques significantly reduce initial data:
Shallow clone (only the latest commit): git clone --depth=1 https://ghclone.com/https://github.com/owner/repo.git Partial clone (skip historical blobs, fetch on demand): git clone --filter=blob:none https://ghclone.com/https://github.com/owner/repo.git Single branch only: git clone --single-branch --branch main https://ghclone.com/https://github.com/owner/repo.git
Shallow clones suit read-only code inspection; partial clones suit day-to-day development, where Git fetches historical blobs on demand.
Troubleshooting common errors
- repository not found: check the path spelling and case; for private repositories use the official address with your own credentials.
- fatal: unable to access: link fluctuation; retry or switch lines.
- Clone stalls midway: for large repositories, clone shallowly first and complete history with
git fetch --unshallow.
Submodules and bulk URL rewrite
For projects with submodules, rewrite the URL prefix inside the local repository only (--local affects the current repository only):
git config --local url."https://ghclone.com/https://github.com/".insteadOf "https://github.com/"
Note that the rewrite also affects write operations such as push, while this service forwards read-only traffic only. Avoid --global so that commits and pushes keep working as usual.