Integrate GitHub Enterprise Server with Jira Cloud
Quickly learn how to connect GitHub Enterprise Server git repositories via Git Integration for Jira Cloud.
What’s on this page:
- Integrate GitHub Enterprise Server with Jira Cloud
- Creating a personal access token
- Using Git service integration
- Single git repository integration
- Setting up GitHub Enterprise Server permissions
- Default repository permission
- Teams and collaborators
- Setting up GitHub web links
- Viewing git commits in Jira Cloud
- Working with branches and pull requests with GitHub Enterprise Server
- Default branch
- Creating branches
- Creating pull requests
- More Integration Guides
Creating a personal access token
While instructions from GitHub works just fine, follow this article for a quick step-by-step guide to get you started.
Using Git service integration
This process requires an existing GitHub Enterprise Server account.
We recommend using the Git service integration panel to connect multiple repositories from your GitHub Enterprise Server account.
-
On your Jira dashboard menu, go to Apps ➜ Git Integration: Manage integrations.
-
On the Manage integrations page, click Add integration.
-
For the following screen, click GitHub Enterprise Server to start integration with this git service.
-
On the following screen, click on the Git service integration panel for your integration type.
-
For this guide, click on the PAT GitHub Server to select it.
-
We recommend the PAT integration for this git service. This uses personal access tokens to setup GHE integrations. Users will have to configure their own PAT from GHE to use for this setup.
-
For the Host URL, enter the address of the GitHub Enterprise Server.
-
For admins/owners, repository managers, collaborators or users that have enabled 2FA, enter the PAT on the Token field.
-
For GHE webhook indexing integration, see this article instead.
-
Configuring the Advanced settings is optional. However, admins/power users may set how the project listing is displayed.
-
Custom API Path – this is a relative path that starts with “/”. The integration will use the relative REST API path to retrieve the list of tracked repositories. The maximum allowed length is 2000 characters or less.
To learn more examples, see article Jira Cloud: Working with Custom API Path.
-
JMESPath filter – JMESPath is a query language for JSON used to filter API results and to limit which repositories are integrated. The maximum allowed length is 2000 characters or less.
Read about JMESPath expressions on their website. For help with writing expressions, please contact support.
To learn more examples, see article Jira Cloud: Working with JMESPath Filters.
-
-
While Custom API Path and JMESPath filter are mutually exclusive, you can use one, the other, both or neither.
-
-
Click Connect and select repositories to proceed to the next step. The Git Integration for Jira app will read all available repositories from your GitHub Enterprise Server account.
-
The following screen is displayed.
-
Repositories that are added or removed from GitHub will be likewise connected or disconnected from Jira Cloud.
-
Use the search options to filter displayed repositories for the current screen.
-
Connect all repositories and organizations or select specific repositories to connect for this integration.
-
-
Click Connect repositories to complete the setup.
GitHub Enterprise Server repositories are now connected to Jira Cloud.
Single git repository integration
This process requires an existing GitHub Enterprise Server git repository. Look for the the repository clone URL on the repository project page.
Use this information to connect the GitHub git repository to your Jira Cloud via Git Integration for Jira app:
Single git repository integration (HTTPS)
Setting up GitHub Enterprise Server permissions
We recommend using a “service user” in GitHub Enterprise Server (example: “GitIntegrationforJira”) to be used to integrate with Git Integration for Jira app. This dedicated “service user” will allow the GitHub Enterprise Server administrator to set permissions so the app clones only the desired repositories.
Assign GitHub Enterprise Server permissions for team members or collaborators to allow which resources are accessible for service users. This feature is only available in a GitHub Organization.
Default repository permission
-
Login to your GitHub Enterprise Server account.
-
Go to Profile ➜ Settings.
-
On your sidebar, click Organizations.
-
Click Settings for the selected organization.
-
On your sidebar, click Member Privileges. The following screen is displayed.
-
Under the Base permissions, click on the dropdown button.
- Choose the base permission level for organization members. The base repository permission only applies to organization members and not to outside collaborators. If the base permission is set to None, organization members will need to be given access to repositories using the Teams or Collaborators methods (see below).
-
Save the changes.
For more information, see Access Permissions on GitHub ».
Teams and collaborators
To give a member additional access, they must be added to a team or make them collaborators on individual repos.
Set default repository permission for the current team:
-
Open an organization team. (Your org ➜ Teams ➜ scroll down to the bottom then click the desired team.)
-
Click the Repositories tab.
-
Set Read, Write or Admin repository access as desired.
Assign members to a team on your GitHub repository:
-
Create a team in your GitHub Organization.
-
Invite a member to add it into the team. An email invitation is sent to that GitHub service user.
- The service user is then added to the team if the invitation has been accepted.
-
Click the service user to manage permissions for this member to:
-
Set desired Role for this member.
-
Convert this member to outside collaborator.
-
Give this member access to organization repositories.
-
Remove this member from the team.
-
-
Click Manage access to manage repository access for this member.
While users have configured PAT for repository access, users in a GitHub Organization must at least have **Read** permissions. This allows them to view commits and smart commits (if enabled) of connected GitHub Organization repositories inside Jira.
For collaborators and commit authors, set these users to have Write permissions. This will allow them to view commits and smart commits, browse repositories and also enables them to create branches and pull requests to specified GitHub git repositories via developer panel of a Jira issue.
For more information on organization teams, see GitHub: Organizing Members into Teams ».
For more information on inviting collaborators, see Inviting Collaborators to a Personal/Organization Repository ».
Setting up GitHub web links
The Git Integration for Jira app automatically configures web linking for GitHub Enterprise Server git repositories.
For single repository connections, web link setup is optional. However, git links will become available in Git Commits tab when configured.
For more information on this feature, see Documentation: Web linking.
Viewing git commits in Jira Cloud
-
Perform a git commit by adding the Jira issue key in the commit message. This action will associate the commit to the mentioned Jira issue.
-
Open the Jira issue.
-
Scroll down to the Activity panel then click the Git Commits tab.
-
Click View Full Commit to view the code diff.
For more information about this feature, see Documentation: Linking git commits to Jira issues.
Working with branches and pull requests with GitHub Enterprise Server
This process requires a GitHub Enterprise Server git repository and a PAT with repo
scopes.
For GitHub Organization, the user must have the Write permissions and the repo
PAT scopes.
Default branch
Most git integrations allow changing of the default branch of the repository/project other than “master”. This change is reflected in the Repository Settings of the Git Integration for Jira app on the next reindex. Full feature integrations support this function where Git Integration for Jira app gets the default branch from almost all integrations and apply this setting at repository level.
Creating branches
On your Jira Cloud, open a Jira issue. On the Jira Git integration development panel, click Open Git Integration then click Create branch. The following dialog is displayed.
Pointers:
-
Select a Repository from the list.
-
The git host service logo is displayed for all the repositories in the dropdown list to easily identify which git service they belong.
-
If there are several repositories with the same name, the listed GitHub repositories will have their names attached with a GitHub organization name. For example,
BigBrassBand/second-webhook-test-repo
. -
Use the search box in the dropdown list to filter displayed repositories.
-
OPTIONAL Designate the repository to be the default selected repository for current Jira project. To configure default repositories for more than one Jira project – use the User settings page.
-
-
Choose a Base branch.
OPTIONAL Designate the branch to be the default selected branch for the active repository. To configure default branches for more than one repository – use the User settings page.
-
Enter a Branch name or leave it as is (recommended).
The newly-created branch is now listed in the developer panel under Branches. Perform a commit to the newly-created branch to be ready for merge.
Creating pull requests
The pull request feature works the same as merge request. On your Jira Cloud, open the Jira issue where your previously created a branch. On the developer panel under Git Integration, click Create pull request. The following dialog is displayed.
Pointers:
-
Select a Repository from the list.
-
The git host service logo is displayed for all the repositories in the dropdown list to easily identify which git service they belong.
-
If there are several repositories with the same name, the listed GitHub repositories will have their names attached with a GitHub organization name. For example,
BigBrassBand/second-webhook-test-repo
. -
Use the search box in the dropdown list to filter displayed repositories.
-
OPTIONAL Designate the repository to be the default selected repository for current Jira project. To configure default repositories for more than one Jira project – use the User settings page.
-
-
Choose the newly-created branch as the Source branch.
OPTIONAL Designate the branch to be the default selected branch for the active repository. To configure default branches for more than one repository – use the User settings page.
-
Set master as the Target branch.
-
Enter a descriptive Title or leave it as is (recommended).
The pull request is listed on the developer panel of the Jira issue page.
The pull request is also ready for approval by the reviewers in your GitHub web portal.
More Integration Guides
GitHub.com (Git Integration for Jira Cloud)
GitHub Enterprise Server (this page)
GitLab.com (Git Integration for Jira Cloud)
GitLab CE/EE (Git Integration for Jira Cloud)
Azure DevOps | Visual Studio Team Services (VSTS) (Git Integration for Jira Cloud)
Azure DevOps Server | Team Foundation Services (TFS) (Git Integration for Jira Cloud)
AWS CodeCommit (Git Integration for Jira Cloud)
Gerrit (Git Integration for Jira Cloud)
Bitbucket Cloud (Git Integration for Jira Cloud)
Introduction to Git integration (Git Integration for Jira Cloud)