# Your first repository

> Add an SSH key, create a repository, and push to it.

Every repository lives on a knot, the server that stores its git data, issues and pull requests. By default, Tangled hosts your repositories on `knot1.tangled.sh`, so you don’t need to run anything. To keep them on a server you control, see [Self-hosting](/docs/knots/self-hosting/).

## Add an SSH key

Pushing needs a public SSH key in your account. Make one if you don’t have one:

```sh
ssh-keygen -t ed25519 -C "alice@example.com"
cat ~/.ssh/id_ed25519.pub
```

Paste the output into **Settings → Keys → Add SSH key**.

If your SSH agent holds many keys, pin the right one in `~/.ssh/config`:

```plaintext
Host tangled.org
    User git
    IdentityFile ~/.ssh/id_ed25519
    IdentitiesOnly yes
```

## Create a repository

Open [New Repository](https://tangled.org/repo/new), give it a name, and keep **Host with Tangled** selected.

## Push

Push an existing project to it:

```sh
cd my-project
git remote add origin git@tangled.org:alice.tngl.sh/my-project
git push -u origin main
```

To move a repository you already push elsewhere, change `origin` and push every branch and tag:

```sh
git remote set-url origin git@tangled.org:alice.tngl.sh/my-project
git push origin --all
git push origin --tags
```

[Repositories](/docs/guides/repositories/) covers cloning, forking and access.