GitDBDocs
Getting started

Your first repository

Create a private repository on gitdb.co, add an SSH key, and push your first commit.

This page walks you through creating a repository, adding an SSH key so Git can authenticate you, and pushing your first commit. It takes a few minutes.

1. Create the repository

  1. Click New in the top bar and choose New repository. You can also use Create repository → on your dashboard.
  2. On Create a new repository, fill in:
    • Owner: this is your username, and it can't be changed on this form. The repository is created in your personal namespace.
    • Repository name: see the naming rules below.
    • Description (optional): up to 1024 characters.
    • Visibility: Private. Public repositories are coming soon.
  3. Click Create repository →. You land on the new repository's page.

A new repository has no commits yet, so its page shows a Quick start panel with the exact commands to push to it. The same commands are listed in step 3.

Repository naming rules

RuleDetail
Length1 to 39 characters
CharactersLowercase letters, numbers, and hyphens
Start and endMust start with a letter or number, and must not end with a hyphen
HyphensNo two hyphens in a row
UniqueThe owner can't already have a repository with the same name
ReservedThese names are reserved because they collide with pages inside a repository: tree, blob, raw, commit, commits, branches, tags, releases, pulls, pull, issues, issue, wiki, actions, projects, settings, edit, compare, graphs, network, find, search, discussions, new

Renaming a repository is coming soon, so pick a name you want to keep.

2. Add an SSH key

Git over SSH authenticates you with a public key that you register on gitdb.co.

  1. If you don't have an SSH key yet, create one with OpenSSH on your computer:

    ssh-keygen -t ed25519 -C "you@example.com"
  2. Open Settings → SSH keys and click Add SSH key.

  3. In the Add SSH key dialog:

    • Key name: a label you'll recognize, for example work-laptop.
    • Public key: paste the contents of your public key file, for example ~/.ssh/id_ed25519.pub. It must be an OpenSSH public key line that starts with ssh-ed25519, ssh-rsa, ecdsa-sha2-…, sk-ssh-ed25519@openssh.com, or sk-ecdsa-sha2-….
  4. Click ADD KEY →.

gitdb.co identifies the key by its fingerprint. Never paste your private key.

Each key in the list shows its name, fingerprint, when it was Added, and when it was Last used. To remove a key, click its delete icon and confirm with DELETE KEY →. Any client using that key for Git over SSH stops authenticating immediately, and this can't be undone.

An SSH key acts with your own account's permissions in each organization.

3. Push your first commit

The repository's Quick start panel ("Quick start — push your first commit") shows these commands with your own names filled in. In the commands below, replace {org} with the repository owner (your username) and {repo} with the repository name.

Push an existing repository from the command line

git remote add origin ssh://gitdb.co/{org}/{repo}
git branch -M main
git push -u origin main

…or create a new one on the command line

echo "# README" > README.md
git init
git add README.md
git commit -m "Initial commit"
git branch -M main
git remote add origin ssh://gitdb.co/{org}/{repo}
git push -u origin main

Refresh the repository page after the push. It now shows the file tree, the latest commit, and your rendered README.md.

Create the repository on gitdb.co before you push: pushing to a repository that doesn't exist is refused with "repository not found".

Clone a repository

Use the same remote address to clone:

git clone ssh://gitdb.co/{org}/{repo}

git clone checks out the repository's default branch. See Default branch.

Prefer HTTPS?

You can also clone and push over HTTPS using a personal access token as your password. See Personal access tokens.

If your first branch isn't main

If you push a branch other than main or master first, the repository has no default branch yet. The Branches tab then shows No default branch is set. Choose one with Set as default on the Branches tab, or in Settings → Branches, so clones check out the right branch.

Next

On this page