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:

  1. 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
    
  2. 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
    
  3. 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.

  4. 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 URLRedirects to
acme/cligithub.com/acme/cli.git
acme/cli.gitgithub.com/acme/cli.git
jane/dotfilesgithub.com/jane/dotfiles.git
my-org/infra.gitgithub.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-AgentDetected As
git/2.43.0git clone
git/2.39.3 (Apple Git)git clone
curl/7.81.0Not git
Mozilla/5.0Not 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.

FieldDescription
NamespaceGitHub user or org
ProjectRepository name
Hit Type"clone"
Client Tool"git"
Client VersionGit version string (e.g. 2.43.0)
TimestampWhen the clone occurred (UTC)
CountryDerived 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

README.md
## 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.