Git Integration for Jira Self-Managed (Data Center/Server) Documentation

Adding and connecting a nested repository

Adding a nested repository with Git Submodule

While, GitHub does not allow nested repositories (Git doesn’t allow this for bare repositories), you can use submodules to nest repositories on the “client side” in the working tree:

  1. Clone the parent directory.

  2. Add the sub-repository as a submodule:

    git submodule add https://github.com/<username>/<sub_repo>.git

    The <sub_repo> module will then be linked to the parent repo and can be found in the <sub_repo> directory.

  3. Commit (.gitmodules and <sub_repo>), push and you’re done.

The git submodule add command works on most Git services that supports it. Check with your Git service documentation on how to add a submodule.

 

Connecting a nested repository with Git Integration for Jira app

Connecting a nested repository is similar to adding a plain Git repository through the Git Integration for Jira app.

  1. Go to the Manage repositories/integration configuration page.

    • Pre version 5.x, Jira dashboard Git menu ➜ Manage repositories.
    • Version 5+, Jira dashboard Git menu ➜ Manage integrations.
  2. Connect a nested git repository integration via the following:

    • Pre version 5.x, click either the Connect to Git repository button or the Git icon on the integration panel.


    • Version 5+, click on the Add integration button, then click Plain Git repository on the list of hosting service or use the Quick start panel.


  3. On the following screen, paste the clone URL of the submodule from your git service portal.


    • Pre version 5.x (example above), click Next to continue.
    • Version 5+, click Add integration to continue.
  4. On the Authentication screen, the input fields depends on what type of clone URL you’ll be using:

    • HTTPS authentication – Enter your credentials such as username and password. For the password, provide the PAT as the password.

    • SSH authentication – Provide the private ssh key. If your SSH key requires a passphrase, provide that as well.


    For this example, we used the HTTP(S) authentication. Enter Username and PAT (personal access token) as the password. Click Next to proceed or click Add integration (if you are using GIJ 5+).

  5. On the Settings screen, leave all options as is. Click Finish to complete this setup.


 

The nested repository configuration is added to the Manage repositories/integrations list.



 

Connecting an integration that contains nested repositories

Adding an integration containing nested repositories is similar to connecting a new integration via the Git Integration for Jira app.

  1. Go to the Manage repositories/integrations configuration page.


  2. For this session, we will use GitLab as an example. Click the GitLab full-feature integration icon on the integration panel. The following screen is displayed.


  3. On the Connect screen, enter the required personal access token to continue. Click Connect to continue.


    The Git Integration for Jira Data Center app will scan the remote git service and connect found repositories. Click Import repositories to continue.

  4. On the Settings screen, leave all options as is. Click Finish to complete this setup.


 

The integration configuration containing nested repositories is added to the Manage integrations list.


 


Prev: Nested repository

Next: Edit a nested repository settings

Have feedback about this article? Did we miss something? Let us know!
On this page
OSZAR »