Cloning APIGIT Repositories Locally
While the APIGIT portal provides the most intuitive editor and viewer for managing API specifications, you can also work with your repositories locally. As a full-featured Git platform similar to GitHub, APIGIT allows you to clone repositories to your local machine, edit files in your preferred IDE, and push changes back to APIGIT.
Authentication Requirements
APIGIT offers two ways to authenticate Git operations, similar to GitHub: a personal access token over HTTPS, or an SSH key. Username/password authentication is not supported for security reasons.
This page first covers cloning over HTTPS with an access token, then cloning over SSH.
Step 1: Generate an Access Token
If you don’t already have an access token:
- Open the account menu in the top right corner, choose My Settings, and select Personal Access Token
- Under Generate New Token, enter a token name and click Generate token
- Copy and save the token immediately in a secure location, as it will not be displayed again
Tokens created from now on are limited to repository access (Git and the repository API). Tokens created earlier keep their original, broader scope and continue to work. If you would like to replace an older token with a limited one, regenerate it: generate a new token, update your saved credentials and CI settings, and then delete the old one.

Step 2: Find the Repository URL
To get the repository clone URL:
- Navigate to your repository’s main page
- Click the cloud download icon in the repository toolbar (tooltip “download or clone code”); the Clone/Download dialog opens on HTTPS
- Copy the repository HTTPS address. The line under it reminds you to sign in with your username and a Personal Access Token as the password

Step 3: Clone the Repository
Open a terminal on your computer and use the Git clone command with your username and access token:
$ git clone https://app.apigit.com/apigit/demo.git
Cloning into 'demo'...
Username for 'https://app.apigit.com': <<YOUR USERNAME HERE>>
Password for 'https://app.apigit.com': <<YOUR ACCESS TOKEN HERE>>
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 9 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (9/9), 2.09 KiB | 1.04 MiB/s, done.After cloning, you can make changes locally using your preferred editor and push them back to APIGIT using standard Git commands.
To get a copy of the files without Git, click Download zip in the same dialog.
For a repository synchronized with a third-party Git provider, the dialog shows the address of your remote repository. Clone from there and push there.
Clone over SSH
If you prefer not to handle tokens, you can clone and push over SSH with a key pair. SSH access is served from git.apigit.com.
Step 1: Generate an SSH key
If you do not already have a key, create one:
$ ssh-keygen -t ed25519 -C "you@example.com"Accept the default location (~/.ssh/id_ed25519) and choose a passphrase. This creates a private key (id_ed25519), which you must keep to yourself, and a public key (id_ed25519.pub), which you give to APIGIT.
Step 2: Add the public key to APIGIT
- Open the account menu, choose My Settings, and select SSH Keys
- Under New SSH Key, enter a Key name, paste the contents of
~/.ssh/id_ed25519.pub(for example fromcat ~/.ssh/id_ed25519.pub) into Public key, and click Add SSH Key
Step 3: Check your key
Before cloning, check that your key is accepted:
$ ssh -T git@git.apigit.comThe first time you connect, SSH shows the server’s host key fingerprint and asks you to confirm it. Compare it with the table below before answering yes. A successful test prints:
Hi <your username>! You've successfully authenticated to APIGit with the key "<key name>".
APIGit does not provide shell access; use this key with git clone, fetch and push.The missing shell is expected: the SSH endpoint only serves Git.
Step 4: Copy the SSH URL and clone
Open the Clone/Download dialog from the repository’s main page, switch it to SSH (it has an HTTPS / SSH toggle), and copy that address. Then clone:
$ git clone git@git.apigit.com:apigit/demo.gitHost key fingerprints
These are the host keys of git.apigit.com, on port 22 and port 443 alike. If SSH shows a fingerprint that is not in this table, do not connect.
| Key type | SHA256 fingerprint |
|---|---|
| ED25519 | SHA256:k3KTtGN+Uq3t8Eekf92Sxxpi9GMPSHcLG04I6/juzo4 |
| ECDSA | SHA256:R9bhGlwyyg3Wpi1yDFHyu3eeaRM1mQ1Y0bJai8Qx5Vg |
| RSA | SHA256:eAZfQAlkiQPaX5R81zBmeR5WMjRvWE7btC5SGTzxqFY |
Port 443
If your network blocks outgoing connections on port 22, SSH is also available on port 443. Add this block to ~/.ssh/config:
Host git.apigit.com
Hostname git.apigit.com
Port 443
User git
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yesIdentityFile and IdentitiesOnly make SSH offer only this key. The server allows 3 authentication attempts, so an agent holding many keys can otherwise fail with “Too many authentication failures”.
With it in place, the same commands work unchanged (git clone git@git.apigit.com:apigit/demo.git).
Deploy keys
A deploy key gives a machine, such as a CI runner or a server, access to a single repository without tying it to a personal account. A new deploy key is read-only unless you tick Allow write access. See Deploy Keys.