ServiceNow GitHub Integration

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2025 11:50 PM
Hi,
Can someone please help me to set the GitHub integration with ServiceNow. I have an existing scoped applications in ServiceNow, where we want to link with GitHub. I have created the repo in github, created credentials in servicenow and tried to connect it from studio "Link Source control" but I am getting below error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2025 02:08 AM
@Community Alums, did you setup the access for the token as well?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi Community Alums,
Setting up GitHub integration with ServiceNow especially for scoped applications can be tricky, and errors like this usually stem from configuration mismatches or missing permissions. Before diving into the fix, here’s how to approach the setup more holistically:
What to consider before integrating GitHub with ServiceNow:
- Purpose of integration
Are you looking to just link source control to scoped apps, or also automate change tracking, issue linking, and deployment workflows? - Authentication method
Ensure you’re using the correct credential type—GitHub for personal access tokens or OAuth based on how your repo is set up (especially for private repos). - Branch and repo permissions
Double-check that the GitHub user associated with your token has push/pull access to the repo, and the correct branch is referenced in the Studio setup. - Scoped vs. Global apps
Studio's “Link to Source Control” behaves differently for scoped applications. The app’s manifest and structure must meet specific GitHub repo expectations.
If you’re looking to go beyond manual linking between GitHub and ServiceNow including scoped app changes, issues, or workflows OpsHub Integration Manager, a ServiceNow Partner supports all of this. It helps teams maintain cross-system traceability and automation without manual work or scripting.
Hope it helps!:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2025 02:17 AM
Thanks for bringing this up ran into a similar issue a while back when linking a scoped app with GitHub. In my case, it turned out to be a permissions problem with the personal access token. Double-checking that the repo scope was enabled on the token solved it for me. Also, make sure the credential record in ServiceNow is correctly configured with that token. Sometimes it helps to delete and recreate it fresh. Hope that helps a bit!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2025 02:19 AM - edited 07-07-2025 02:20 AM
Hi @Community Alums,
It appears to be access issue. Please add the required rights to token in order to commit to Github.
Additionally, you can use this resource for committing applications to Github repo:
It has the details on what shall be done.
Regards,
Ehab Pilloor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago - last edited a month ago
Fix it by checking the two most common causes: the token's permissions and the user's role on the repository.
Check Your GitHub Personal Access Token (PAT) Scopes
This is the most likely reason for the error. When you create a Personal Access Token in GitHub, you must grant it specific permissions (called "scopes"). To link a ServiceNow application, the token needs full control over repositories.
Go to your GitHub account.
Click your profile picture in the top-right and go to Settings.
On the left menu, scroll down and click <> Developer settings.
Click on Personal access tokens and then Tokens (classic).
Find the token you created for ServiceNow. You may need to regenerate the token to change its scopes.
When creating or regenerating the token, make sure you check the main repo scope. This single checkbox grants all the necessary read, write, and admin permissions for repositories.
Correct Configuration:
The main repo box should be checked. This automatically grants all the child permissions needed for full control.
Incorrect Configuration:
If you only checked sub-options like repo:status or didn't check the repo scope at all, you won't have write access.
After generating the new token with the correct scope, copy it immediately.
Go back to your ServiceNow instance, navigate to the Credentials record you created, and paste this new token into the Password/Token field.
Verify Your Repository Permissions
The second possibility is that your user account itself doesn't have the correct role on the specific GitHub repository.
In GitHub, navigate to the repository you are trying to link.
Click on the Settings tab for that repository.
Go to Collaborators and teams.
Find your username in the list of collaborators. Your permission level should be Write or Admin. If it says Read, you will get the exact error you are seeing.
If you only have Read access, you must ask the repository owner or an organization administrator to upgrade your permissions to Write or higher.
In 99% of cases, the problem is that the repo scope was not selected when creating the Personal Access Token.
Once you've updated your token with the correct scope and updated the credential record in ServiceNow, go back to Studio and try the "Link to Source Control" action again. It should now connect successfully.