Last updated on 15th October 2026

GitHub - Key is too short

When you connect a GitHub repository to a DeployHQ project, you may see this error:

key is too short. GitHub recommends using ssh-keygen to generate a RSA key of at least 3072 bits.

Why this happens

When you connect a repository, DeployHQ adds your project's public SSH key to it as a deploy key. Since 14 October 2026, GitHub no longer accepts new RSA keys shorter than 3072 bits.

Many projects created before late 2022 have a 2048-bit RSA key, because RSA was the default key type then. These keys keep working with every repository they are already added to, so existing deployments are not affected. GitHub only refuses them when you add the key to a repository it is not already on, for example when you switch a project to a different repository.

How to fix it

Regenerate the project's SSH key as ED25519. GitHub accepts ED25519 keys and they are the DeployHQ default for new projects.

The same project key is also used to connect to your servers, so a new key has to be installed on them as well. Deployments to those servers will fail from the moment you regenerate the key until step 4 is done, so avoid deploying in between:

  1. Open your project and go to Repository.
  2. In the SSH key section, choose ED25519 as the key type and click Regenerate Key.
  3. Copy the new public key.
  4. Add the new public key to ~/.ssh/authorized_keys on every server in this project that connects with SSH keys. See Uploading your public key to your server.
  5. Connect the GitHub repository again. DeployHQ adds the new key as a deploy key automatically.
  6. Run a deployment to confirm everything connects.

If you connected the repository manually instead of through the GitHub integration, add the new public key to the repository yourself. See Uploading your public key to GitHub manually.

Once the new key is working everywhere, you can remove the old key from your servers' authorized_keys.

Further reading