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
- Click New in the top bar and choose New repository. You can also use Create repository → on your dashboard.
- 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.
- 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
| Rule | Detail |
|---|---|
| Length | 1 to 39 characters |
| Characters | Lowercase letters, numbers, and hyphens |
| Start and end | Must start with a letter or number, and must not end with a hyphen |
| Hyphens | No two hyphens in a row |
| Unique | The owner can't already have a repository with the same name |
| Reserved | These 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.
-
If you don't have an SSH key yet, create one with OpenSSH on your computer:
ssh-keygen -t ed25519 -C "you@example.com" -
Open Settings → SSH keys and click Add SSH key.
-
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 withssh-ed25519,ssh-rsa,ecdsa-sha2-…,sk-ssh-ed25519@openssh.com, orsk-ecdsa-sha2-….
- Key name: a label you'll recognize, for example
-
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 mainRefresh 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
- Create a personal access token for scripts, CI, and Git over HTTPS.
- Browse your repository on gitdb.co.
- Turn on AST indexing so agents can search your code by symbol and meaning.