Skip to content

Quickstart

Create a repository, set up Git to sign in with an API key through the ezgh CLI, clone it and push.

Updated View as Markdown

You need the ezgh CLI, a project with git.repositories.create (in GitFullAccess), and an API key: Git signs in with an API key, not with a login from ezgh login.

  1. Create a repository:

    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.

  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:

    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 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:

    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 or a bot’s key as the password, with any username:

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.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close