Link an app to source control in ServiceNow Studio

task brazil Updated Sep 10, 2026 3 min read link-app-to-source-control.md
Raw file servicenow.com

Link an application or application customization to a Git repository in ServiceNow Studio so application developers can manage changes directly from the platform.

Before you begin

  • Review Manage customizations to applications before linking a customization.
  • Create a dedicated Git repository for the application. For increased security, enable multi-factor authentication for the Git repository.
  • Generate an access token for the source control integration to use instead of a password and multi-factor authentication passkey when creating a Credential record. Search for personal access token on GitHub or GitLab.
  • Restrict permissions on the access token to allow read and write access to the Git repository.
  • Verify that the non-production instance has network access to the Git repository.
  • Ensure that each user adds the email address they use in their Git commits to their Users table [sys_user] record.
  • Role required: admin

About this task

You cannot link an application or customization to source control on a production instance. To install applications on a production instance, use the application repository, an update set, or ServiceNow Studio.

Procedure

  1. Navigate to All > App Engine > ServiceNow Studio.

  2. In the file navigator, select the application you want to open.

  3. Select App details to open the app in the canvas.

  4. Select Source control > Link to source control.

    [Omitted image "source-control-link-to-sc-purple.png"] Alt text: Link to source control dialog box

  5. Enter the connection details for the Git repository.

Field

Description

Network protocol

HTTPS or SSH credential type that enables secure channel data exchange.

URL

The URL of the Git repository where you want to save application files. For SSH protocol, use the following command to generate a private key: ssh-keygen -t rsa -m PEM -b 4096 -C "email@address".Note: If the SSH URL provided by your Git server does not work, contact your Git server owner or provider for the correct URL. Additional specifications such as scheme protocol prefixes and port numbers may be required.

Branch

The repository branch to use for commits. The default branch is set to "main" if it is not already set in the remote repository. If there is no default branch in the remote Git repository, the instance creates a new default branch named "main". Configure this using the glide.source_control.git_default_branch system property.

MID Server Name

The name of the existing MID Server to link through. Use a separate MID Server to prevent conflicts with Discovery activities.Verify that the MID Server user can create files in the [sys_attachment] table and that the table accepts files of the "bundle" type.

Connecting through a MID Server enables access to repositories behind a firewall. For more information, see MID Server.

Default email

The committer email address is taken from the sys_user record when available. If a committer's sys_user record email field is empty, the ServiceNow AI Platform generates an alternate email address (username@instancename.service-now.com). Enter a default email address to use when no sys_user email is available.To use the default email address in all cases, select the check box.

Credential

The credential to use with the selected protocol. For more information about creating credentials, see Get started with credentials.Note: For SSH protocol, enter a valid credential of the SSH private key type. For HTTPS protocol, enter a valid credential of the Basic Auth credentials type.

Commit Comment

An optional description of the repository or application.

**Note:** All application developers on the instance share a single set of repository credentials.
  1. Select Link to source control.

    The ServiceNow AI Platform validates the connection and user credentials and displays a success message. All application developers on the instance can now use the linked Git repository to manage changes.

Parent Topic:Configuring ServiceNow Studio

Related topics

MID Server

Getting started with credentials

Search documentation
Search document titles and file paths on the brazil branch