How to Generate a Deploy Key for a Private Git Repository with AI Connector

To deploy a website from a private Git repository on GitHub, GitLab, or Bitbucket, the repository must trust your hosting server. This is done using a deploy key—an SSH key that grants the server read-only access to your repository.

With the JetHost AI Connector, you can generate a deploy key in seconds without using the command line or manually creating SSH keys.

In this article, you’ll learn how to generate a deploy key that you can add to your private Git repository.

When It’s Useful

Generating a deploy key is especially useful when:

  • Your website’s code is stored in a private repository and you want to deploy it securely.
  • You’re setting up deployments from GitHub, GitLab, or Bitbucket.
  • You want to grant your hosting server read-only access without sharing your personal SSH keys.

How to Generate a Deploy Key

🤖Example prompts for your AI assistant 💬
Generate a deploy key for my hosting service to access the repository git@github.com:firmata/sait.git.
I need a public SSH key to connect a private GitHub repository.

What to Do with the Deploy Key

  1. Copy the public SSH key provided by your AI assistant.
  2. Open your Git repository settings and navigate to the Deploy Keys section.
  3. Add the key with read-only access.

💡 Tip: The private key never leaves the server. It is installed directly in your cPanel account and is never displayed or returned in any response. If you generate a deploy key again for the same hosting service and repository, you’ll receive the same public key instead of creating a new key pair.

The Next Step

Once you’ve added the deploy key to your repository, you’re ready to deploy your website. Continue with the guide on deploying a website from a private Git repository.