Setting Up Repositories

Setup repositories and manage them in the Git add-on configuration in Jira.

 

Go to cog Administration  > Add-ons  >  Git Integration Plugin for Jira  > Git Repositories.

helpful tip
If using Jira 7, go to Administration  > Add-ons. Select Applications on the page tab. Under Git Integration Plugin for Jira on the sidebar, select Git Repositories.

The Git configuration page can also be accessed via the Dashboard Git menu > Manage repositories.

In this page, a git host/server can be connected to Jira via the Connect to Git Repository button.  Administrators can perform the Bulk Change action to import/export git repositories into Jira via a TSV file.

The Reindex All action will reindex all repositories/servers in the Git configuration list.

The Git configuration list displays the connected repositories/servers, location, enabled/disabled state, display name, last index and status.

To the right of the Status column are actions that can be performed for the selected connected repository/server.

warning
When setting up repositories with the Git add-on, you need to have the necessary access permissions on the private key on the Git server to proceed.
warning
The Git Integration for Jira add-on supports v3 and v4 of the GitLab API (in both Jira Cloud and Jira Server).
note
For cases when git repositories are hosted at Windows servers (Windows Server network drive) — while it is using the Windows server networking, the network credentials accessing the git repository must be the same as the user running Jira.
warning
When using Windows network shares for the repository origin, it is recommended to allocate repositories’ paths shorter than 256 characters.
For example: \\WS129\custom-repo\project-z\
Otherwise, the provided URL will not be recognized as valid.
FYI
For Jira hosted on Windows:
When using Active Directory accounts for repository access, changing the password of the AD account running Jira can cause repository authentication issues.
The solution for this is to restart Jira to regain access to repositories.
FYI
As of v2.8.3 of the Git add-on, the REST API for add, update, and delete repository is implemented.  The documentation for this feature is available at Git add-on: Hook and API Reference - Repository REST API open in new tab.

Using the Add Repository Wizard

Click Connect to Git Repository.  The Add Git Repository wizard is displayed.

Connect to Git Repository wizard start screen

Enter required repository location.

Click Next. The wizard will automatically detect the entered repository location type.

FYI
Detection of Remote Origin Setting
The detection works for most repositories. If a repository root points to a valid git repository, the repository origin is detected automatically.  When a repository has no origin, the user has to specify it manually.
note
Do note that the repository wizard clones the remote repository by default.  It does not clone local repositories. For local repositories, it sets root to local path and disables fetches.

Starting v2.6.7 of the Git add-on, the default identities are not used and the repository is created without the additional key upload.
helpful tip
If the Git repository file system is somehow available to the Jira server, you can save the clone step and save the disk space on a Jira server by pointing the Jira server straight at it.

Settings

In the Settings screen, enable or disable the Git Viewer feature for this repository as required.

[Connect to Git Wizard Settings screen

Enable or disable the Smart Commits setting for this repository as required.

Enter available projects as required in the Associate Project Permissions field or check the Associate to All projects checkbox to associate all projects.

note
The View Development Tools project permission must be granted to Users > Group > Project Roles.

Click Next.

HTTPS Authentication

If the entered git host requires http credentials, the following screen appears:

Connect to Git Wizard http authentication screen

Provide Username and Password in the respective fields then click Next to continue.

note
The HTTP authorization errors indicate that the credentials provided are not valid.
Connect to Git Wizard ssh authentication screen

Configure the required SSH private key by navigating to the private key file or pasting the private key text into the pastebox.

note
For establishing safety connection with SSH, upload a Public Key to the SSH server and set the Private Key to the SSH client. Take note that the SSH server is the Git server and the SSH client is the Jira server.
helpful tip
When adding a new repo that requires an SSH key, you can now pick an existing associated key in the Existing key list.

Click Next to proceed.

Passphrase Input

Connect to Git wizard authentication screen passphrase

Enter the Passphrase, if required. Click Next to continue.

note
The passphrase screen only appears if the user has added an SSH key that requires a passphrase.
FYI
The Git add-on will try first to use the keys provided by the user before using the keys from the home directory.

After the above requirements are fulfilled, the wizard will:

  • create a local copy of the git repository; and
  • index the git repository to build change history.

Click Finish to close the wizard.  The newly added repository appears on the git repositories list of the add-on.

Adding a Repository via Advanced Setup Jira Server Only

warning
As of v2.6.12, the Git add-on supports repositories that do not have a branch named "master".

Use the Advanced setup if you have set up the Git repository ahead of time outside of the Jira Git add-on.  Configure repositories via Advanced setup in order to manage advanced options.

Open the Connect to Git Repository wizard then click the Advanced Setup label.

The following advanced setup screen is displayed:

Connect to Git - Advanced Repository settings

Enter the required information.

Utilize the following options for adding new git repositories:

Repository Settings
Display Name  –  This is the name that will appear in the Git add-on repositories list. (Required)
Repository Root  –  This is the local path to the repository on the server where your Jira service is running.  This will point the Git add-on to a clone of the repository hosted locally with Jira. (Required)
Enable Fetches
Git repository hosted on remote server
In this mode, fetches are enabled using any external source. The reindex background service will initiate the fetch then add the new commits to the plugin index.
Git repository hosted on same server as Jira
Fetches are enabled when the repository is hosted locally. In this mode, no fetches are made. The reindex service runs in the background and process every new commit found.
Repository Origin
This is the URL to the hosted git service used on the project.
For example, you might host your repository on GitHub, Beanstalk or your own server.
FYI
The repository origin may not be hosted on the same server as Jira.

The detection works for most repositories. If a repository root points to a valid git repository, the repository origin is detected automatically. When a repository has no origin, the user has to specify it manually.
Revision Indexing
This option turns on the memory cache which is used when list of commits are displayed.  Select if revision indexing will index and link to any mentioned issue keys in the revision history or not.
Revision Cache Size
This is the size of the memory cache.  If some particular commit is not cached, it is fetched from the Lucene index which involves some disk activity.
Enter the number of revisions to keep the cache in memory.  The default value is 10000.  Higher values can affect the performance of the retrieved revisions from Git.
Tags
Show all tags  –  This will display all the tags for the specific issue.
Show tags matching the pattern  –  This will display tags on issue pages that match the specified regular expression pattern.
release2[.](7|8)[.][0-9]+
This example is a filtering regexp for a range of releases from 2.7.x to 2.8.x.  The sidebar will display git tags for release versions 2.7.0 to 2.8.x in decending order.
Main Branch
Specified branch will intend to organize the git commit tab.  A commit will not be shown in other branches if it is a part of the main branch.  By default, "master" will be used if a main branch is not specified.
Use basic http authentication
Most git hosts provide http access to git repositories.  Enter required credentials to configure basic http authentication to remote git repositories.
Repository Browser
Advanced setup - Git Viewer and Project Permissions
Enables or disables the Git Viewer feature for this repository. The default setting for this option is Enabled.  Users must have the View Development Tools project permission in order to use this feature.  Consult your Jira System Administrator on permissions.  For more information, see section, The Repository Browser.
Project Permissions Jira Server
Associate Project Permissions  –  One or more projects must be mapped to this repository to make Git Commits tabs available in the Issue screens of the associated projects.
FYI
This field requires at least one existing project if the Repository Browser for this repository is enabled.
Associate with all projects  –  Enable this option to associate this repository to all projects.  Disable this option if you want to use existing mapped projects from the Associate Project Permissions field.  The default setting is enabled (checked).
Source Code Diff Viewing
Advanced setup - Source Code Diff Viewing, Smart Commits and Email Notifications
When enabled, this setting allows Jira users with the View Development Tools and correct Jira/Git Integration for Jira add-on permissions to view the commit and file diffs inside Jira.
Smart Commits
See section, Smart Commits.
This setting is enabled by default (as of v2.6.3 of the Git add-on).
Commit Notification Emails
Send notifications  –  Enables or disables commit notification emails for this repository.
Max. commit age in minutes  –  Set the desired value in minutes, as to when commit notifications will be sent.  Commit notifications will be e-mailed if the age of the commit is less than or equal to this value.
Weblinking
The Weblinking configuration is optional.  For more information about this option, see section, Weblinking.

Click Add to save the settings.  The newly added repository appears on the git repositories list of the add-on.

Repositories created via the Advanced setup will perform an initial reindex.

Adding a Repository Hosted on Windows Servers or Windows Network Share

Add a new network share or Windows server hosted repository via the Connect to Git Repository wizard.

The wizard will continue without errors if the following conditions are met:

  • The network credentials accessing the git repository must be the same as the user running Jira.
  • The network path is not longer than 255 characters.
  • The user under which Jira is running should at least have read access to network path.

In the Git configuration page, edit the repository via Actions > Edit repository.

Under Repository Settings, set Enable Fetches option to Git repository hosted on the same server as Jira.

Windows network share git repository on same server

Verify network folder share name by opening the shared folder properties:

For example:

Windows network shared folder properties

Make sure that the user has read access permissions to the network path.

For example:

Windows network shared access permissions properties

Setup Repository Root Not Located in Jira Home Directory

There are three possible ways to setup a repository root that is not located in the Jira home directory:

  • Clone the repository outside of Jira then connect to it via Connect to Git Repository  >  Advanced Setup.
  • Clone the repository with the standard Connect to Git Repository Wizard into the Jira home directory.  Soon afterwards, move the cloned repository and update the settings on the repository.
  • You could symlink the {$Jira_HOME}/data/git-plugin directory to a different volume.  The standard Connect to Git Repository Wizard will still write there, but the data will reside on the different volume.  But be aware, that Git add-on treats anything in the Git-Plugin folder as a clone that it owns.

Adding Tracked Folders Jira Server

Manage git repositories page - Connect to git repository - Add tracked folder

Introduced in v2.9.0 of the Git add-on, this feature scans a locally accessible path for cloned Git repositories and automatically imports those Git repository references into Jira.  A repository group called TRACKED FOLDER is added into the Git add-on repository settings.

warning
The Add tracked folder feature requires that Jira and the git servers be on the same filesystem.  Make sure that the user that Jira is running with has access permissions to the path with the git repositories.

 

To add repositories via Tracked Folders:

  1. Go to  cog Administration  > Add-ons  >  Git Integration Plugin for Jira  > Git Repositories.
  2. helpful tip
    If using Jira 7, go to Administration  > Add-ons. Select Applications on the page tab. Under Git Integration Plugin for Jira on the sidebar, select Git Repositories.
  3. Click the dropdown arrow on Connect to Git Repository then Add tracked folder.
  4. The following dialog is displayed: Add Tracked Folder wizard
  5. Enter the Tracked folder location in the required field then click Scan folder.
  6. For example: /home/ec2-user/repositories/*

    In the following dialog, the wizard will find git repositories stored in the provided path and displays the list of repositories found. Found tracked folder dialog

    In the above example repository root, /home/ec2-user/repositories/*, all repositories under this mask (/home/ec2-user/repositores/<repo1>, /home/ec2-user/repositores/<repo2>) will be handled as one entry in the Git Repositories configuration page.  For other features, these are treated as seperate repositories.

    information
    The Add tracked folder wizard scans the local path one folder level deep.
  7. Click Import repositories.
  8. The wizard automatically adds the detected repositories to Jira.  If a repository is added to the path, Jira will add it to the index. If a repository is removed from the path, Jira will drop the index for that repository.
  9. On the Permissions dialog, set Repository Browser and Project Association permissions, if required.  Click Next.
  10. Click Finish to complete adding the tracked folder.

The tracked folder is added to the repository configuration list.

helpful tip
You can add multiple tracked folders in case your repositories are spread among multiple locations.

Editing a Tracked Folder

On the Git Repositories settings page, click  cog Actions  > Edit tracked folder to modify tracked folder git repository settings.

Found tracked folder dialog

Removing a Tracked Folder

On the Git Repositories settings page, click  cog Actions  > Delete tracked folder to remove the tracked folder configuration from Jira.

A confirmation dialog will be displayed:

  1. Leave the checkbox unchecked to just remove the tracked folder setting from the repository configuration list. (The local path for this tracked folder will still remain in the local system for later use); or
  2. Tick the checkbox to permanently delete the tracked folder and its files from the local system.

Reset Index

On the Git Repositories settings page, click  cog Actions  > Reset index.

This action will reset the indexes of the repositories for the selected tracked folder.

Viewing Tracked Repositories

On the Git Repositories settings page, click  cog Actions  > Show tracked repositories.

This action will open the Tracked Folder dialog showing the tracked repositories.

note
The Repository Browser will not display the repository if it is disabled in the Git Repositories configuration. The commits and code diffs in the Issue > Git Commits, Git Roll Up and Project tabs will also be unavailable due to this.

Reindexing a Tracked Folder

On the Git Repositories settings page, click  cog Actions  > Reindex tracked folder.

This action will perform a reindex of the selected tracked folder.

FYI
If a new repository is manually added into the local path, the Git add-on will detect the new repository folder on the next reindex and add it into the existing tracked folder in Jira.
note
If a repository folder is manually deleted from the local path, the Git add-on will remove the repository setting from the tracked folder in Jira on the next reindex.

Connecting to GitHub.com via Git Integration for Jira

Connect to GitHub.com git repositories via the Auto-connect integration panel GitHub icon.

GitLab v10+ stopped accepting username/password credentials for API access and will only recognize Personal Access Tokens (PAT) and OAuth authentications. Service users are strongly advised to switch from using username/password for GitLab.com to using Personal Access Tokens.

 

fyi
Webhooks will be automatically registered for each GitHub repository connected to Jira Cloud to instantly index your commits.  For this to work, the connecting GitHub user must be the Organization Owner or have repository ADMIN rights.
Webhooks will be deleted when GitHub integration is disconnected from Git Integration for Jira Cloud.
fyi
For newer GitLab authentication, in order to access a Git repository over HTTP, use the username as the username and the PAT for the password.
helpful tip
Admin/Power Users:
To pass the private access token (for example: XpigzF1JxMnAZ7mn9qgN) to an API call with GitLab.com:
curl --header "Private-Token: XpigzF1JxMnAZ7mn9qgN" https://gitlab.com/api/v4/projects?membership=true

Connecting to a GitLab Server

Introduced in v2.9.4 of the Git add-on, this feature scans a remote GitLab server and automatically imports those Git repository references into Jira.  A repository group called GITLAB SERVER is added into the Git add-on repository settings.  This feature can import more than a hundred repositories from a GitLab server and can track added or deleted repositories upon reindex.

In order for GitLab to display correct repository clone links to users, it needs to know the URL under which it is reached by the users. For example, http://gitlab.example.com.

GitLab v10+ stopped accepting username/password credentials for API access and will only recognize Personal Access Tokens (PAT) and OAuth authentications.  Service users are strongly advised to switch from using username/password to using Personal Access Tokens for newer versions of GitLab Server (CE/EE).

For GitLab Server service users, they won't see the issue until they upgrade their GitLab Servers to version 10 and higher.  Git Integration for Jira add-on offers pre-v10 GitLab Server service users as a Legacy connection option.

helpful tip
Currently the Git add-on scans only the repositories visible to the user which is used for scanning.  The repositories which are publicly visible (shared for all members or visible to the member with the admin rights) will not be scanned.  This will be supported in a future release.
helpful tip
BigBrassBand recommends a dedicated service user for this integration which has access permissions to the GitLab git repositories.
helpful tip
The Git Integration for Jira add-on supports v3 and v4 of the GitLab API (in both Jira Cloud and Jira Server).

Connecting to Jira Server for GitLab Server v10/Legacy:

 

helpful tip
In order for GitLab to display correct repository clone linkes to your users, it needs to know the URL under which it is reach by your users (example: http://gitlab.yourorg.com). For more information, see this article.

To connect repositories from a GitLab server (Legacy, pre-v10.2):

  1. On your Jira Dashboard menu, click Git then Manage git repositories.
  2. On the Auto-connect integration panel, click GitLab.
  3. The Connect to GitLab wizard is displayed: Connect to GitLab Wizard - GitLab server
  4. Select the External service from the dropdown list.  For this guide, choose GitLab Server (CE/EE) Legacy.
  5. Enter the Host URL of the GitLab server.  Enter the username.  Enter the personal access token as the password.
  6. On the Repositories Found screen, the wizard will display git repositories of the git server that it finds.
  7. Found tracked Git repos dialog
  8. Click Import repositories.
  9. The wizard automatically adds the detected repositories to Jira.
  10. On the Permissions dialog, set Repository Browser and Project Association permissions, if required.  Click Next.
  11. Click Finish.

To connect repositories from a GitLab server (v10.2 and newer):

  1. On your Jira Dashboard menu, click Git then Manage git repositories.
  2. On the Auto-connect integration panel, click GitLab.
  3. The Connect to GitLab wizard is displayed: Connect to GitLab Wizard - GitLab server
  4. Select the External service from the dropdown list.  For this guide, choose GitLab Server (CE/EE).
  5. Enter the Host URL of the GitLab server.  Enter the username and password credentials for server authentication.

  6. On the Repositories Found screen, the wizard will display git repositories of the git server that it finds.
  7. Found tracked Git repos dialog
  8. Click Import repositories.
  9. The wizard automatically adds the detected repositories to Jira.
  10. On the Permissions dialog, set Repository Browser and Project Association permissions, if required.  Click Next.
  11. Click Finish.

The GitLab server is added to the repositories list as a connected server and is automatically reindexed.

Manage a Connected GitLab Server

On the Git Repositories settings page, click  cog Actions  > Edit connected server to modify tracked repositories settings.

Reset Index

On the Git Repositories settings page, click  cog Actions  > Reset index.

This action will reset the indexes of the repositories for the selected connected server.

Manage Tracked Repositories

On the Git Repositories settings page, click  cog Actions  > Show tracked repositories.

This action will open the Tracked Folder dialog showing the tracked repositories of the connected server.

Just like in the Git repositories configuration list, a tracked repository can be enabled/disabled by toggling the Enabled box of the selected repository.

note
The Repository Browser will not display the repository if it is disabled in the Git Repositories configuration. The commits and code diffs in the Issue > Git Commits, Git Roll Up and Project tabs will also be unavailable due to this.

Reindexing a Connected GitLab Server

On the Git Repositories settings page, click   Actions  > Reindex connected server.

This action will perform a reindex of the selected tracked folder.

FYI
If a new repository/project is manually added via the GitLab server, the Git add-on will automatically detect the new repository on the next reindex and add it into the existing tracked repositories of the connected GitLab server in Jira.
note
If a repository/project is manually deleted via the GitLab server, the Git add-on will automatically remove the repository setting from the tracked repositories on the next reindex of the connected GitLab server in Jira.

Removing a Connected GitLab Server

On the Git Repositories settings page, click  cog Actions  > Delete tracked folder to remove the tracked folder configuration from Jira.

A confirmation dialog will be displayed:

  1. Leave the checkbox unchecked to just remove the tracked repositories setting from the repository configuration list. (The cloned repositories for this connected server will still remain in the local system for later use); or
  2. Tick the checkbox to permanently delete the tracked repositories of the connected server and its files from the local system.

Connecting to AWS CodeCommit Jira Cloud

AWS CodeCommit is a git host service by Amazon Web Services to store and manage source code, related files and private Git repositories in the cloud.  This service works like a Git-based repository providing similar functions to that of a git host.

helpful tip
You can use the AWS CLI or the AWS CodeCommit console to track and manage your repositories.

For more information on AWS CodeCommit configuration and deployment, see AWS CodeCommit User Guide open in new tab.

Auto-Connect

To connect your repository to Jira thru the Git Integration for Jira Cloud add-on, open the Connect to Git Repository wizard:

  1. On the Jira navbar, click Git .
  2. Select Manage Git Repositories.
  3. On the following screen, use the Auto-connect integration panel for automatic integration of git repositories.
  4. Git for Jira Cloud Auto-Connect integration panel
    Click a git host icon on the Auto-connect integration panel to start connecting the git repositories for the selected git host. For this case, click on the AWS CodeCommit icon.
  5. On the following screen, select a Region then enter credentials for Access key ID and Secret access key.
  6. Click Next to continue.
  7. Click OK to complete this process.

The Git Integration for Jira Cloud add-on supports tracked folders for AWS CodeCommit git repositories. The connected git host is scanned for existing repository folders.  The found repositories can then be added to the Git Repositories configuration.

There are two ways to configure the git repository connection using tracked folders with Git Integration for Jira Cloud:

  • connect via Auto-connect integration panel > AWS CodeCommit, or
  • connect via Connect to Git Repository dropdown > AWS CodeCommit.

If the connected git host has newly added repositories, the Git add-on will automatically add them to the git repositories configuration on the next reindex.  For the deleted git repositories, these will be removed from the Git add-on repositories configuration on the next reindex.

HTTP/HTTPS Connections

On the Authentication screen, enter the Access Key ID as the username.  Enter the Secret Access Key as the password.

See http://docs.aws.amazon.com/general/latest/gr/glos-chap.html#accesskeyID open in new tab for information about Access Key ID in AWS.

SSH Connections

SSH connections are handled automatically if the PUBLIC KEY was added in the AWS IAM console and the associated PRIVATE KEY was added/uploaded on the Jira side (Git Integration for Jira > SSH Keys > Add SSH Key).

For detailed information on managing public SSH keys in AWS IAM console, see AWS SSH Security Settings open in new tab .

If authentication issues are encountered during connecting an AWS repository to Jira, modify the original URL by inserting the SSH Key ID as the username.  The SSH Key ID is an alphanumeric sequence provided by AWS IAM when importing a PUBLIC KEY for a particular user account in IAM.

For more information on SSH Keys with AWS, see this article open in new tab .

For example, the original URL is:

ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/test-repo

 

If the SSH Key ID 1a2b3c4d5e is applied to the original SSH URL, the resulting URL would be:

ssh://1a2b3c4d5e@git-codecommit.us-east-1.amazonaws.com/v1/repos/test-repo

 

The modified URL can now be used as a valid repository URL via Git Integration for Jira > Connect to Git Repository.

Connecting to AWS CodeCommit JIRA SERVER

fyi
The Server version of Git Integration for Jira add-on only accepts SSH connections.

For detailed information on managing public SSH keys in AWS IAM console, see AWS SSH Security Settings open in new tab .

SSH connections are handled automatically if the PUBLIC KEY was added in the AWS IAM console and the associated PRIVATE KEY was added/uploaded on the Jira side (Git Integration for Jira > SSH Keys > Add SSH Key).

For more information on SSH Keys with AWS, see this article open in new tab .

If authentication issues are encountered during connecting an AWS repository to Jira, modify the original URL by inserting the SSH Key ID as the username.  The SSH Key ID is an alphanumeric sequence provided by AWS IAM when importing a PUBLIC KEY for a particular user account in IAM.

Like in the URL example above (Git Integration for Jira Cloud), insert the SSH Key ID to the original URL and use the resulting URL in the Connect to Git Repository wizard > Remote Git URL field:

  1. Go to Administration > Applications (Jira 6.x - Go to Administration > Add-ons).
  2. On the sidebar, under Git Integration for Jira, select Git Repositories.
  3. On the following screen, click Connect to Git Repository.
  4. Clicking the dropdown arrow will display supported git host-specific connection setup.  For this case, select AWS CodeCommit.
  5. Enter the modified URL in the Remote Git URL field.
  6. Connect to Git Repository screen - entering the modified URL in the Remote location field
  7. Click Next.
  8. Set repository options then click Next.
  9. Click OK to complete this process.

Automatically Connect to HTTPS Git Repositories with Self-signed SSL Certificates or Other SSL issues Introduced v2.11.2

Self-signed certificates are common in HTTPS Git repositories that are hosted privately.  Even for an administrator, it's not easy to set the HTTP sslVerify to connect to this repository.

As of v2.11.2 of the Git add-on, the Jira administrator now has the option to disable sslVerify for specific repositories while inside Jira.

This feature is available in Connect to Git Repository wizard and Auto-connect integration panel for GitHub and GitLab:

  1. Connect a repository via Manage Git Repositories page.
  2. Add a remote repository by clicking GitLab in the Auto-Connect integration panel.
  3. Auto-connect integration panel click GitLab
  4. Enter the remote URL of the private git server.
  5. Enter credentials (username and password).
  6. Click Next.
  7. If there is an indication of an SSL error, the following screen is displayed:
  8. Git for Jira repository connection set sslVerify to false screen
  9. Click Ignore certificate errors and continue connection.  This will ignore SSL verification if it's self-signed or expired.
  10. Click Next to connect to the repository or tracked repositories.
  11. Click Finish to complete the connection setup.

Manually Connect to HTTPS Git Repositories with Self-signed SSL Certificates or Other SSL Issues

When connecting to a private HTTPS git repository, a problem may be caused by a custom (self-signed) certificate.  Make sure to install the latest JRE and then change the JAVA_HOME of Jira server.

If the above solution doesn't work, see below for the steps to workaround this issue:

  1. From your Jira Server, clone the repository manually using the git client.
  2. Example:
    cd /jira/home
    cd data/git-plugin
    git clone --mirror https://my-self-signed-repo/project.git
  3. Make sure the Jira user has access to the folder above.
  4. Configure the repository to disable verification of the SSL certificate.
  5. Run git config http.sslVerify false in the repository folder.
    Example:
    cd project.git
    git config http.sslVerify false
  6. Add repository to the Git Integration Plugin using Advanced setup open in new tab.
  7. Set repository root to the folder that was used in step 1.
  8. The clone will be kept up-to-date and the SSL verification issues will be ignored.

There are alternative solutions to make Java trust this certificate.  Refer to the good articles from Atlassian which focuses on helping to resolve SSL Verification Issues:

  1. Unable to Connect to SSL Services due to PKIX Path Building Failed open in new tab
  2. Connecting to SSL services open in new tab
tips
For connecting repositories from other git hosts, see Integration Guide.

Editing a Repository

Go to  cog Administration  > Add-ons  >  Git Integration Plugin for Jira  > Git Repositories.

The git repository configuration page can also be accessed via Dashboard menu Git > Manage repositories.

helpful tip
If using Jira 7, go to Administration  > Add-ons. Select Applications on the page tab. Under Git Integration Plugin for Jira on the sidebar, select Git Repositories.
Git Repositories - Edit repository
List of configured repositories on the add-on administration pages.

Enable/disable a repository by clicking the checkbox under the Enabled column of the selected configured repository.

Click  cog Actions > Edit repository settings to modify repository settings.  See Adding a Repository via Advanced Setup for detailed information on the option fields.

The SSL Verify option is set to Enabled by default.  If set to disabled, the Git Integration for Jira add-on will disable verification of SSL certificates when connecting to a git server.

repository settings, ssl verify option
In the above example, the Repository Settings screen from Jira Cloud is shown.
helpful tip
The SSL Verify setting is available in both Jira Server and Jira Cloud.  This option is not available for non-fetched repositories.

Click the view cog icon to see repository details:

Setting Description
Status This is the repository connection status.
  • It shows updated if Repository Root is configured correctly and the Jira instance can access it.
  • Jira Server It showsDisabledif the Enabled status of connected repository is unchecked.
  • It shows Reindexing,Running orQueued during reindexing of the connected repository or tracked folder/repositories.
  • It shows Error if the connected repository has connection issues with the configured git host.
Last Indexed This is the date and time when synchronization was last executed.
Repository Root See Adding a Repository.
Repository Origin See Adding a Repository.
Changeset, File Added, File Modified, and File Deleted formats Displays the weblinking format strings (if set in the repository weblinking configuration).
fyi
The displayed repositories can be sorted by clicking the corresponding list header.  The add-on will remember the sorting choice per user.
note
The Repository Browser will not display the repository if it is disabled in the Git Repositories configuration. The commits and code diffs in the Issue > Git Commits, Git Roll Up and Project tabs will also be unavailable due to this.

Managing Add-on Settings with Git Repositories

The following cog Actions are available in managing add-on configuration with the git repository.

Action (Server) Action (Cloud) Description
Reindex repository Reindex Immediately starts the synchronization with the selected repository.
Jira Server This option is unavailable when the connected repository status is Disabled.
Edit repository settings Edit Edits the Git repository add-on configuration.
Reset index Clears the last indexed revision and rebuild Lucene index on next synchronization.
Remove repository Disconnect Removes the Git repository add-on configuration.
View log View log Opens a dialog showing the indexing log of the connected repository or tracked folder.

For tracked folder/repositories:

Action (Server) Action (Cloud) Description
Reindex tracked folder Reindex Immediately starts the synchronization with the tracked folder.
Jira Server This option is unavailable when the connected repository status is Disabled.
Edit repository settings Edit Edits the tracked folder repository configuration.
Reset index Clears the last indexed revision and rebuild Lucene index on next synchronization.
Remove tracked folder Disconnect Deletes/Disconnects the tracked folder add-on configuration.
View log View log Opens a dialog showing the indexing log of the tracked folder.
Show Tracked Repositories Show Tracked Repositories Opens the Tracked Repositories dialog to see the connected tracked repositories from the git host.

This option is only available if the added repository is a tracked folder or tracked repositories.

Removing a Repository

Delete a repository if it isn't needed or is broken in the Git Plugin configuration.

  1. Go to cog Administration > Add-ons.  Under Git Integration Plugin for Jira, select Git Repositories.
  2. The git repository configuration page can also be accessed via Dashboard menu Git > Manage repositories.

    helpful tip
    If using Jira 7, go to Administration  > Add-ons. Select Applications on the page tab. Under Git Integration Plugin for Jira on the sidebar, select Git Repositories.
    Git config delete repository
  3. Click Remove repository under the Actions column for the selected repository.
  4. The confirmation screen is displayed.  Uncheck the Delete repository files... option to retain git repository files in the displayed path or leave it checked to also delete the repository files from the displayed path.
  5. Click Delete to remove the repository.  Click Cancel to abort this process.