SSH Access to GIT Repository

SSH Access to a Git Repository

SSH authentication allows applications to be deployed securely from private Git repositories without storing a repository password in the platform. The setup requires a matching SSH key pair: the private key is added to the platform account, while the public key is registered with the Git provider.

Overview

The platform can deploy applications from public or private Git repositories. For private repositories, SSH key authentication provides a secure way to clone and update application sources from services such as GitHub, GitLab, Bitbucket or a self-hosted Git server.

Private repository accessConnect to repositories that are not publicly accessible.
Passwordless authenticationAuthenticate by using a cryptographic key pair instead of a repository password.
Secure source deploymentClone and update application code over the SSH protocol.
Multiple providersUse GitHub, GitLab, Bitbucket or a private Git server.
!

Do not protect the deployment key with a passphrase

The private key used by the platform for automated Git access must not contain passphrase protection. Passphrase-protected keys cannot be used for unattended repository authentication.

Requirements

Git repositoryA private repository hosted on GitHub, GitLab, Bitbucket or another SSH-compatible Git server.
Repository accessPermission to add an SSH public key to the repository account or server.
Platform accountAccess to the account settings where private SSH keys are managed.
SSH clone URLThe repository address in SSH format, for example git@host:owner/repository.git.

Generate an SSH Key Pair

Create a new SSH key pair consisting of a private key and a public key. The private key remains confidential and is uploaded to the platform account. The public key is added to the Git provider.

1

Open a terminal

Use a local terminal, PowerShell, Git Bash or another command-line tool with OpenSSH available.

2

Generate the key

Create a dedicated key pair for Git deployment. Use an empty passphrase when prompted.

ssh-keygen -t ed25519 -C “git-deployment-key”
3

Locate both files

The generated private key has no file extension, while the public key normally ends with .pub.

Use a dedicated deployment key

Create a separate SSH key pair for platform-to-repository access instead of reusing your personal workstation key.

Add the Private Key to the Platform

1

Open account settings

Sign in to the platform dashboard and click Settings in the upper toolbar.

2

Open Private Keys

In the user settings, navigate to SSH Keys and select Private Keys.

3

Add the private key

Click Add Private Key, paste the complete private-key content into the key field and enter a clear name, such as git-deployment-key.

4

Save the key

Click Add. The key should appear in the private-key list after successful validation.

Add a private SSH key to the platform account
Add the deployment private key under Settings → SSH Keys → Private Keys.
!

Keep the private key confidential

Never add the private key to the Git provider, a public repository, a support ticket or shared documentation. Only the corresponding public key should be distributed.

Add the Public Key to the Git Provider

Copy the full contents of the public-key file and register it with the account or repository that hosts your source code. For self-hosted Git servers, add the public key to the authorized-key list for the Git account.

GitHub Configuration

1

Open SSH key settings

Sign in to GitHub, open the account settings and select SSH and GPG keys.

2

Create a new SSH key

Click New SSH key, provide a recognizable title and paste the complete public key into the key field.

3

Confirm the addition

Click Add SSH key and complete any account-confirmation step requested by GitHub.

4

Copy the SSH repository URL

Open the required repository, select the SSH clone option and copy the repository address.

Add a public SSH key to GitHub
Register the public key in GitHub and copy the SSH clone URL.

GitLab Configuration

1

Open SSH Keys

Sign in to GitLab, open your profile preferences and navigate to SSH Keys.

2

Add the public key

Paste the public key, enter a descriptive title and optionally specify an expiration date when required by your organization.

3

Save the key

Click Add key and confirm that the new entry appears in the SSH-key list.

4

Copy the SSH clone URL

Open the project, select the SSH clone option and copy the displayed repository address.

Add a public SSH key to GitLab
Add the public key to GitLab and obtain the SSH clone address.

Bitbucket Configuration

1

Open personal SSH key settings

Sign in to Bitbucket, open your personal settings and navigate to the SSH-key management section.

2

Add a new key

Click Add key, enter a label and paste the full public-key content.

3

Save the key

Confirm the addition and verify that the key is displayed in the account key list.

4

Copy the SSH clone URL

Open the required repository, choose the SSH clone option and copy the repository URL.

Add a public SSH key to Bitbucket
Register the public key in Bitbucket and copy the SSH clone URL.

Deploy the Project Through SSH

1

Open the deployment manager

In the platform dashboard, open the deployment or project section for the required application server.

2

Add a Git repository

Create a new repository entry and provide the project name, SSH repository URL and required branch.

3

Enable authentication

Select Use Authentication, choose SSH Key as the access type and select the private key that was added to the platform account.

4

Save the repository

Click Add or Save to store the project configuration.

5

Deploy the application

Select the repository, branch and deployment target, then start the deployment. The platform will clone the project through the secure SSH connection.

Deploy a Git project using SSH authentication
Select SSH Key authentication and choose the uploaded private key.

Use the SSH URL, not the HTTPS URL

The repository address normally begins with git@ or ssh://. An HTTPS repository URL will not use the SSH key selected in the deployment configuration.

Expected Result

The platform can securely authenticate with the private Git repository by using the selected SSH private key. The application source can be cloned, deployed and updated without entering a Git account password.

Important Notes

  • The private key must not be protected with a passphrase.
  • Add the private key only to the platform account and the public key only to the Git provider.
  • Use a dedicated key pair for automated deployments.
  • Copy the SSH clone URL rather than the HTTPS URL.
  • The Git account or key must have permission to read the required repository and branch.
  • Deleting a private key from the platform key manager may not automatically remove it from projects that already use it.
  • Remove unused public keys from the Git provider and rotate deployment keys periodically.

Common Issues and Solutions

Private key is rejectedConfirm that the complete key was pasted and that it is not protected with a passphrase.
Permission denied (publickey)Verify that the matching public key is registered with the Git provider and has access to the repository.
Repository cannot be foundCheck the repository owner, project name and SSH clone URL.
Wrong key is usedEdit the repository configuration and select the correct private key from the SSH-key list.
Branch is unavailableConfirm the branch name, including capitalization, and make sure it exists in the remote repository.
HTTPS credentials are requestedReplace the HTTPS repository URL with the SSH clone URL.
Deployment stopped after key rotationUpload the new private key, add the matching public key to the Git provider and update the project configuration.