---
title: "Quickstart"
description: "Create a repository, set up Git to sign in with an API key through the ezgh CLI, clone it and push."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

You need the [ezgh CLI](/cli), a project with `git.repositories.create` (in `GitFullAccess`), and
an [API key](/iam/api-keys): Git signs in with an API key, not with a login from `ezgh login`.

1. Create a repository:

   ```sh
   ezgh git repos create site --wait
   ```

   It prints the repository, with its clone URL. In the console, it's **Git › Repositories › Create
   repository**; with the API, [CreateRepository](/git-api/CreateRepository/).

2. Create an API key and store it in a profile of its own, `git`, so your `ezgh login` stays as it
   is. Then set up Git to sign in with that profile, once per machine:

   ```sh
   ezgh iam api-keys create git-laptop
   ezgh --profile git auth set-api-key        # paste the key; it isn't echoed
   git config --global credential.https://*.git.ezghcloud.com.helper '!ezgh --profile git git credential-helper'
   ```

   Git then asks [`ezgh git credential-helper`](/cli/reference/git-credential-helper) for a
   password whenever it talks to an EZGH Git repository, and it answers with `EZGH_API_KEY` or the `git`
   profile's API key. With a login from `ezgh login` it gives Git nothing and says to create
   an API key.

3. Clone it and push:

   ```sh
   git clone https://4k2m9x0a7qpe.git.ezghcloud.com/site.git
   cd site
   echo "# Site" > README.md
   git add README.md
   git commit -m "Add a README"
   git push origin main
   ```

## Without the CLI

Use an [API key](/iam/api-keys) or a bot's key as the password, with any username:

```sh
git clone https://ezgh:$EZGH_API_KEY@4k2m9x0a7qpe.git.ezghcloud.com/site.git
```

Git stores a URL with a password in `.git/config`; prefer the credential helper on a shared
machine. A key that can't see the repository gets `repository not found`.

Source: https://docs.ezghcloud.com/git/quickstart/index.mdx
