Documentation

Push without an account

Create an unclaimed repository with one command or HTTP call, push to it, and claim it into your account later.

You can push code to Upstream without an account. Upstream creates an unclaimed repository, gives you a Git remote that accepts pushes and a claim link, and deletes the repository after 7 days unless someone claims it.

With the CLI

Run this in any folder, even one that is not a Git repository yet:

upstream push

Signed out, the command:

  1. Creates a Git repository on main and commits your files if the folder has none. It leaves out files that look like secrets, such as .env and private keys. Without a .gitignore, it also leaves out dependency and build folders such as node_modules.
  2. Creates an unclaimed repository and pushes main.
  3. Prints the repository link, the claim link and the expiry.

In a folder that already has commits, it pushes what is committed and lists tracked files that look like secrets before pushing, because anyone with the link can read an unclaimed repository. Run upstream push again to push new commits. Add --json to print one JSON document for scripts and agents. Signed in, upstream push creates a normal private repository in your namespace instead, with no expiry.

With curl and Git

curl -sX POST https://api.upstream.codes/v1/unclaimed-repos -d '{"name":"my-app"}'

The body is optional. The response contains:

FieldMeaning
data.repository.urlThe repository page. Anyone with the link can read it.
data.pushUrlA Git remote with a push credential for this repository only
data.claimUrlThe claim link
data.expiresAtWhen the repository is deleted unless claimed

Push with plain Git:

git -c credential.helper= push "<pushUrl>" HEAD:main

The empty credential.helper keeps Git from saving the push credential in your credential store, where it could replace a credential you saved for git.coline.app.

The call returns 201 when the repository is ready. It returns 202 when storage is still being prepared, which takes a few seconds. Until then a push answers that the repository is being prepared. Each call creates a new repository, and the push URL and claim link are shown only once.

Claim the repository

Open the claim link and sign in or create an account. Choose your personal namespace or an organization where you can create repositories, the repository name and its visibility. The repository moves there with its full history.

After the claim:

  • The claim link stops working.
  • The old repository and clone URLs redirect to the new location for anyone allowed to read it.
  • The push URL stops working, so nobody who saw it can push. To keep pushing from the same folder, run upstream auth login and then upstream push, or point the remote at the new clone URL with git remote set-url.

Limits

LimitValue
Lifetime7 days from creation, unless claimed
VisibilityUnlisted: readable by anyone with the link, never listed, searched or indexed
Push dataPushes stop once the repository has received 100 MiB
Git LFSAvailable after the claim
New repositories20 per hour and 60 per day from one network

Signed-in pushes have none of these limits.

The push URL lets anyone push to the repository. The claim link lets anyone take it. Share the claim link only with the person who should own the code, and never commit either link or post it publicly. Unclaimed repositories are not backed up.