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:
- Creates a Git repository on
mainand commits your files if the folder has none. It leaves out files that look like secrets, such as.envand private keys. Without a.gitignore, it also leaves out dependency and build folders such asnode_modules. - Creates an unclaimed repository and pushes
main. - 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:
| Field | Meaning |
|---|---|
data.repository.url | The repository page. Anyone with the link can read it. |
data.pushUrl | A Git remote with a push credential for this repository only |
data.claimUrl | The claim link |
data.expiresAt | When 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 loginand thenupstream push, or point the remote at the new clone URL withgit remote set-url.
Limits
| Limit | Value |
|---|---|
| Lifetime | 7 days from creation, unless claimed |
| Visibility | Unlisted: readable by anyone with the link, never listed, searched or indexed |
| Push data | Pushes stop once the repository has received 100 MiB |
| Git LFS | Available after the claim |
| New repositories | 20 per hour and 60 per day from one network |
Signed-in pushes have none of these limits.
Keep the links private
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.