Legacy - Link an application or application-customization to source control

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 7분
  • Linking an application or application-customization to source control allows application developers to manage changes from a Git repository.

    시작하기 전에

    중요사항:
    Starting with the Xanadu release, the legacy version of ServiceNow Studio is being prepared for future deprecation. It will be hidden and no longer activated on new instances but will continue to be supported. For details on the deprecation process, see the Deprecation Process [KB0867184] article in the Now Support Knowledge Base.

    Try building and editing apps in the current version of ServiceNow Studio instead. For more information, see ServiceNow Studio.

    • Role required: admin
    • Learn more about Managing application-customizations.
    • Create a dedicated Git repository for the application. For increased security, enable multi-factor authentication for the Git repository.
    • Generate an access token that the source control integration can use instead of a password and multi-factor authentication passkey. 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 users add the email address to their respective Users Table (ServiceNow sys_user) records that they use in their commits to the Git repository.
    • Learn more: Legacy - Migrate completed update set history to Source Control

    이 태스크 정보

    The source control integration does not support linking to an application or customization on a production instance. Instead, install applications on a production instance from the application repository, an update set, or the ServiceNow Store.

    프로시저

    1. Open the application you want to link to source control in Studio.
    2. Navigate to Source Control > Link to Source Control.
      Studio displays the Link to Source Control dialog box.Link to Source Control dialog box
    3. Enter the connection details for the Git repository.
      표 1. Source control connection details
      Field Description
      Network protocol HTTPS or SSH credential type that enables secure channel data exchange.
      URL The URL to the Git repository where you want to save application files. For SSH protocol, use command to generate private key ssh-keygen -t rsa -m PEM -b 4096 -C “email@address”.
      주:
      If the Git repo URL for SSH provided by your Git server does not work, check with your Git server owner or provider for the correct URL. There may be additional specifications such as scheme protocol prefixes, port numbers, and so on, required for your Git repo URL to function.
      Credential The credential to be used with the selected protocol. See Getting started with Credentials to learn more about creating credentials.
      주:
      If you select the SSH network protocol, enter a valid credential of the SSH private key type. If you select the https protocol, enter a valid credential of the Basic Auth credentials type.
      Branch The repository branch to work on within the application.
      MID Server Name The name of the existing MID Server to link through.
      주:
      Use a separate MID Server to prevent conflicts with Discovery activities.

      Be sure that the MID server user can create files to the sys_attachment table and that the table can accept files of the “bundle” type.

      Linking or importing an application through a MID Server enables access to repositories behind a firewall. See the Using MID Server with source control and MID Server topics to learn more

      Default email The committer email address is defined by the sys_user record if available. But if a committer's sys_user record email field is empty, the system generates an alternate email (username@instancename.service-now.com). You can also enter a default email address and change it later. To use that default email address in all cases, select the check box.
      Commit Comment An optional description of the repository or application.
      주:
      All application developers on the instance share a single set of repository credentials.
    4. Click Submit.
      The system validates the connection and user credentials and displays a success message.

      All application developers on the instance can use the linked Git repository to manage changes.