Skip to content

Clone with Git

Add an SSH key to your account once, then copy the clone address of any staging or multidev environment you may push code to.

Clone with Git gives you one address to clone an environment's code. You add your SSH key once, to your account. Avaloi turns Git over SSH on for every staging and multidev environment by itself, so there is nothing to set up per site.

Live has no Clone with Git. Live code is read only and changes only by a promote from staging.

Add an SSH key to your account

  1. Open Account settings, then SSH keys.
  2. Give the key a name you will recognize, such as Work laptop.
  3. Paste the contents of your public key file, the one that ends in .pub. No key yet? Run ssh-keygen -t ed25519 -C "[email protected]" and paste ~/.ssh/id_ed25519.pub. Never paste a private key.
  4. Click Add key. If your account has a password, Avaloi asks for it first.

The key works on every staging and multidev environment you may push code to, in every company you belong to. It reaches an environment within a minute or so. You can keep up to 20 keys.

To remove a key, click Remove next to it. The key stops working for Git on your environments shortly.

Who can use a key

Avaloi accepts your key on an environment when you can deploy code to its site (the code.deploy permission):

Role Where your key works
Owner, Admin, Developer Every staging and multidev environment of the company
Site Admin, Site Developer The staging and multidev environments of the sites you were invited to
Billing, Viewer Nowhere. These roles cannot push code.

If you lose the permission, leave the company, or are removed from a site, Avaloi removes your key from those environments. If you add the same key to an environment by hand (the older way, under SFTP and SSH on Info), that copy stays until someone removes it.

Clone an environment

  1. Open the site, pick staging or a multidev in the top bar, and open Info.

  2. In the Code card, click Clone with Git.

  3. Copy the address with Copy and run:

    git clone ssh://USER@HOST:PORT/srv/git/site.git my-site
    

Push to the environment's branch: main for staging, env/{name} for a multidev. Avaloi applies the push by itself. See Git access.

If you see an info icon instead

You have no SSH key on your account yet. Click the icon, or the link in its tooltip, to open SSH keys in Account settings. Once you add a key, go back to the Code card and Clone with Git is there.

If the button says Avaloi is getting Git ready

Avaloi turns Git over SSH on the first time someone opens an environment. It takes a few seconds. If it says SSH is off, turn SSH on under SFTP and SSH on Info.

If the environment uses an external repository

While GitHub, GitLab, or Bitbucket is connected to an environment, that environment takes its code from there. SFTP and Git through Avaloi are off, so there is no Clone with Git. Push to your Git host instead. To change this, open Environments and use the External repository card. See Connect GitHub, GitLab, or Bitbucket.

API

  • GET /v1/users/me/ssh-keys, POST /v1/users/me/ssh-keys with {"name": "Work laptop", "public_key": "ssh-ed25519 AAAA..."}, and DELETE /v1/users/me/ssh-keys/{key_id}. These routes need a signed-in session. An API key or an MCP connection cannot add or remove an SSH key, because a key is a standing way in to your code.
  • GET /v1/environments/{id}/git reports the clone address in avaloi_remote.ssh.url when avaloi_remote.ssh.status is ready.

Still stuck?

Email [email protected] with your site name and what you tried, or send us a message.