Git Clone
Clone repositories through a clean vanity URL. easy-install.sh redirects git clone requests to GitHub so users get a single memorable command.
Quick Start
Clone your first repo
Replace namespace and project with your GitHub username/org and repo name.
git clone easy-install.sh/acme/cli
Deep Dive
How it works
When a user runs git clone easy-install.sh/acme/cli, here is what happens:
-
Ref discovery
Git sends a GET request to discover available refs. easy-install.sh detects the
git/User-Agent and responds with a 307 redirect to GitHub.GET https://easy-install.sh/acme/cli/info/refs?service=git-upload-pack → 307 → https://github.com/acme/cli.git/info/refs?service=git-upload-pack -
Object fetch
Git follows the redirect and negotiates objects directly with GitHub. All data transfer happens between the git client and GitHub — easy-install.sh is not in the data path.
POST https://github.com/acme/cli.git/git-upload-pack -
Analytics recorded
An analytics event fires in the background when the initial request arrives. This is fire-and-forget and never blocks the redirect. The clone continues regardless of whether analytics succeeds.
-
Repository cloned
The repo is cloned to a local directory just like any other git clone. The remote origin will point to GitHub, so subsequent pushes and pulls go directly to GitHub.
Routing
URL patterns
Git clone requests are detected by the git/ User-Agent header. Both URL styles work:
| easy-install.sh URL | Redirects to |
|---|---|
| acme/cli | github.com/acme/cli.git |
| acme/cli.git | github.com/acme/cli.git |
| jane/dotfiles | github.com/jane/dotfiles.git |
| my-org/infra.git | github.com/my-org/infra.git |
The .git suffix is optional — easy-install.sh strips it before looking up the project and always adds it back in the redirect to GitHub.
Detection
Git client detection
The proxy identifies git clone requests by the User-Agent header. Any request with a User-Agent starting with git/ is treated as a clone request and redirected.
| User-Agent | Detected As |
|---|---|
| git/2.43.0 | git clone |
| git/2.39.3 (Apple Git) | git clone |
| curl/7.81.0 | Not git |
| Mozilla/5.0 | Not git |
Note
Non-git clients hitting the same URL will get the normal project info page or file proxy, not a redirect. The behavior is determined entirely by User-Agent.
Analytics
What gets tracked
Each git clone records the following anonymous metadata. No personal information is collected.
| Field | Description |
|---|---|
| Namespace | GitHub user or org |
| Project | Repository name |
| Hit Type | "clone" |
| Client Tool | "git" |
| Client Version | Git version string (e.g. 2.43.0) |
| Timestamp | When the clone occurred (UTC) |
| Country | Derived from IP via geo lookup |
Note
IP addresses are hashed with a one-way SHA-256 function and never stored in plaintext. Analytics are fully anonymous.
Examples
Common usage
Basic clone
git clone easy-install.sh/acme/cli
Clone with .git suffix
git clone easy-install.sh/acme/cli.git
Clone to a specific directory
git clone easy-install.sh/acme/cli my-project
Shallow clone (depth 1)
git clone --depth 1 easy-install.sh/acme/cli
Include in a README
## Install
\`\`\`sh
git clone easy-install.sh/acme/cli
cd cli && make install
\`\`\`
Limitations
Current limitations
Public repos only
easy-install.sh can only redirect to public GitHub repositories. Private repos require authentication that the redirect cannot forward.
Redirect-based
Git clone uses a 307 redirect to GitHub rather than proxying the data. This means the remote origin in the cloned repo will point to GitHub, not easy-install.sh.
HTTPS only
Git clone over SSH ([email protected]:...) is not supported. Only HTTPS clone URLs work through easy-install.sh.