SSH keys are required in order to provide secure connection with the remote git host specified in the Repository Origin field which can be accessed via Connect to Git Repository or in Edit repository/integration settings). The Git Integration for Jira app uses one set of keys for accessing all configured repositories.
Follow this guide if you are one of the users who wre limited to or wanted to use SSH to securely connect to your git repositories.
There are two options available for specifying SSH keys:
Before connecting repositories via SSH, users are required to generate SSH keys for use with the remote git host (public key) and for Git Integration app in Jira (private key).
Generated SSH keys always come in pair. (Example:
For establishing safety connection with SSH, upload a public key to the SSH server and set the private key to the SSH client.
In this case, the SSH server is the Git server and the SSH client is the Jira server. Therefore:
For Windows, we recommend to use PuTTY and use PuTTYgen to generate public and private SSH keys.
PuTTY creates a private key in its own ".ppk" format. To convert it to ".pem", the user should do the Conversions > Export OpenSSH key menu option in PuTTYgen. Add/upload this file to Git Integration for Jira app > SSH keys or when prompted on connecting SSH git repositories in Jira.
You can also use the git bash command line to generate SSH key pair. For detailed information, see Generate SSH via Git bash.
Read on the section Generating SSH Keys and follow specific information for the git host and platform that you use.
On Linux and MacOS, this generates an SSH key in RSA format:
Configure and generate SSH keys for the following git hosting systems by following the reference links on each sub-section:
By v2.6.1 of the Git Integration for Jira app, the Gerrit web linking support is added.
Follow the above GitLab references for GitLab CE/EE. Then verify that your GitLab server
should have the following SSH settings:
|VSTS/TFS/Azure DevOps/Azure Repos|
The SSH support starts with TFS 2013 and later versions.
For generating SSH keys for Azure Repos (which is applicable to MS git hosts), follow instructions at Use SSH Key Authentication.
Utilize the following options for adding the new SSH key:
|Key name||Enter a meaningful name for this private SSH key as required.|
|Private key||This is the actual private SSH key.
Upload the private key file via Browse... or paste the generated private key into the provided field.
|Passphrase||Optional. Enter the passphrase that was assigned to this private key.|
Manage and associate SSH keys to connected git repositories via the SSH Keys in Git Integration for Jira Server app repository configuration page.
The list of added private SSH keys is accessible on this page. Both types of SSH keys are displayed in this list. Legacy filesystem-based keys contain directory path in the Private key column.
Refer to the following table for list column information:
|Name||The name of the private SSH key will appear here.|
|Private key||This is the private SSH key in hex mode.|
|Passphrase||A lock icon is displayed if the SSH key pair has a passphrase.|
|Associations||Lists the repositories that are associated with this SSH key.|
|Last Used By||Lists the repositories that are using this SSH key.|
|Operations||Click the icon to perform Delete or Associations functions.|
Limit the usage of the SSH key by associating them to selected repositories. As of v2.6.9 of the Git Integration for Jira app, the option to strictly map keys to repositories is available.
On the SSH Keys page, click Actions > Associations for the selected SSH key.
The following screen is displayed:
Mark the required repository or repositories to associate the SSH key.
Clicking thetext label marks all repositories that will be associated to this SSH key.
Clicking thetext label deselects all repositores.
Click Save to save the settings.
If you have multiple repositories that uses the same SSH key, configure them via Git Integration app by doing the following steps:
For third-party products or services (such as GitHub, GitLab, Bitbucket, etc.), register the PUBLIC KEY for target repository or in profile settings of your git account.
For custom git hosting servers, ask your administrator to check that the target
keypair's PUBLIC KEY is added into the
authorized_keys file of
the git server. For more information, see the following article:
SSH keys cannot be modified or updated. To change the keys, remove and add them again.
Perform the following steps to reconfigure repositories and SSH key:
For multiple repository configuration, see Bulk Change.
SSH git repositories can be integrated with Jira Cloud via Git Integration for Jira app.
The connected repository is listed in the git configuration page.