Requirements
To follow the steps in this guide, you’ll need:- An Omni API key
- Connection Admin permissions on the model
- A Git-connected model using SSH authentication
- The shared model’s
modelId, which you can retrieve using the List models endpoint ssh-keygeninstalled locally to generate keypairs
Supported key types
Omni accepts RSA and ED25519 private keys in PEM format:- OpenSSH format (default from
ssh-keygen) - PKCS#1 format
- PKCS#8 format
Generate a new keypair
Use When prompted for a passphrase:
ssh-keygen to generate a new RSA or ED25519 keypair.- ED25519
- RSA
- To leave the key unencrypted, press
Enter. - To encrypt the key, provide a passphrase. This is more secure at rest, but you’ll need to supply it to Omni.
omni_deploy_key— The private key, which you’ll supply to Omniomni_deploy_key.pub— The public key, which you’ll authorize with your Git provider
Supply the private key to Omni with the API
Next, call the Update Git configuration API and provide the private key.
- Unencrypted keys
- Passphrase-protected keys
In the terminal, navigate to the same location where the Replace the following variables:
omni_deploy_key file was saved. Then, run the following:<your-subdomain>- Your Omni subdomain<MODEL_ID>- The shared model’s UUID<YOUR_API_TOKEN>- Your Omni API key
publicKey field.Verify the new key works
To verify the setup, navigate back to the Git settings page in Omni. Click the Test git connection button near the top of the page to test the connection.Alternatively, call the Sync model with Git repository endpoint:If the connection test or sync succeeds, the new key is working correctly.
Troubleshooting
400 error: Invalid key format
400 error: Invalid key format
The private key must be in PEM format (OpenSSH, PKCS#1, or PKCS#8) and be a valid RSA or ED25519 key. Common causes:
- The key file is corrupted or incomplete
- The key is in an unsupported format (for example, PuTTY
.ppkformat) - The key file contains extra whitespace or characters
ssh-keygen and try again.400 error: Wrong passphrase
400 error: Wrong passphrase
The passphrase you provided does not match the passphrase used to encrypt the private key. Verify the passphrase and retry.If you’ve forgotten the passphrase, you’ll need to generate a new keypair and start the rotation process again.
400 error: Encrypted key requires deployKeyPassphrase
400 error: Encrypted key requires deployKeyPassphrase
The private key is passphrase-protected, but you didn’t supply
deployKeyPassphrase in the request. Either:- Provide the passphrase via the
deployKeyPassphrasefield - Or generate a new unencrypted key (press Enter when
ssh-keygenprompts for a passphrase)
400 error: deployKeyPassphrase cannot be provided without deployPrivateKey
400 error: deployKeyPassphrase cannot be provided without deployPrivateKey
You included
deployKeyPassphrase in the request body without deployPrivateKey. Remove deployKeyPassphrase or include deployPrivateKey.400 error: deployPrivateKey not supported with authMethod: https_token
400 error: deployPrivateKey not supported with authMethod: https_token
Custom deploy keys are only supported for SSH authentication. If your model uses HTTPS token authentication (
authMethod: https_token), you cannot supply a custom deploy key. HTTPS token connections rotate via the token field instead.To use custom deploy keys, switch your model to SSH authentication.Sync fails after rotation
Sync fails after rotation
If Git operations fail after rotating the key:
- Verify the public key was added to your Git provider with write access.
- Verify the public key in the API response matches the public key you added to your Git provider (compare the
publicKeyfield in the response to the contents ofomni_deploy_key.pub). - Check your Git provider’s webhook logs for authentication errors.
Next steps
- Git integration settings to configure pull request behavior, base branches, and more
- Git integration overview for the full feature set
- Update Git configuration API reference for all available fields

