Connect to a Git provider using OAuth 2.0
Set up an OAuth 2.0 application registry and credentials to connect to your Git provider from ServiceNow Studio.
Configure an OAuth 2.0 application registry for ServiceNow Studio
Configure how the client ID and secret are sent to the OAuth 2.0 provider associated with your Git provider.
Before you begin
Create an OAuth application with your Git provider and configure it to redirect to your instance. In this OAuth application, use your instance URL as the homepage URL and
https://<instance>/oauth_redirect.do for the authorization callback URL. GitHub, GitLab, Bitbucket, and Azure Repos are supported by default.
Role required: admin
- Navigate to .
- Filter the table by entering oauth_entity for the Name field.
- Select the Application Registries [oauth_entity] table.
- In the Columns related list, locate the Client Secret column and enter 2048 as the value of its Max length attribute.
- Select Update.
About this task
To use OAuth 2.0 authentication with ServiceNow Studio, you must register the OAuth application you created from your Git provider. Follow this procedure to configure an OAuth application registry [oauth_entity] on your instance.
Procedure
What to do next
Configure OAuth 2.0 credentials to connect to a Git provider
Configure OAuth 2.0 credentials to connect to a Git provider
Connect to a Git domain or repository using OAuth 2.0 credentials to manage applications in source control from the ServiceNow Studio.
Before you begin
- An administrator must configure how the client ID and secret are sent to the OAuth 2.0 provider associated with your Git provider. For more information, see Configure an OAuth 2.0 application registry for ServiceNow Studio.
- Create a dedicated Git repository for an application in a Git provider such as GitHub, GitLab, Bitbucket, or Azure Repos.
Role required: admin
Procedure
Result
Your Git credentials are associated with your user on the instance and used for all repositories in the domain from the Git repository URL. If you add different credentials for a repository in the same domain, the new credentials are used and the previous credentials are set to inactive.
What to do next
After initializing or cloning a repository, you can begin using source control. For more information, see Using Fluent source control in ServiceNow Studio.
To manage existing Git credentials, use the Git: Manage Git credentials command from the command palette.