How to Set or Change ServiceNow Application's Repository URL, Credentials, or SSH Key
ServiceNow Developer Pro-Tips
·
Mar 04, 2022
·
article
Whether you’ve been getting the dreaded “Repository authentication failed” error message in ServiceNow, or you just want to change which Git repository your ServiceNow application is associated with, this article will help you out. I’ll walk you through the steps to properly set up authentication with Github, and configure (or alter) the Git/Github repository your application is linked with.
> _“Repository authentication failed, check credentials. Make sure the user has both read and write access”_
Unfortunately, ServiceNow has made the interesting (_see: baffling_) decision to make it confoundingly difficult to figure out how to change the Git repo your application is associated with, once it’s been linked to one. I can’t fathom why they might’ve done this, but that is unfortunately not an unusual sentiment when it comes to ServiceNow.
Knowing that I’m liable to let this article devolve into a 10-page ranting, rambling manifesto lamenting the unnecessarily opaque and undocumented process for doing basic things like changing the repo your application is associated with, let’s instead get straight on in to how to do it anyway.
# Generating an SSH Key for Github/ServiceNow
If you haven’t already got one set up (such as if your new repo is associated to a new Github account), you’ll need to first generate an **SSH public/private key pair**. This will allow your ServiceNow instance to authenticate to your your Github account and repositories.
[
](https://handbook.snc.guru)
1. Using a tool such as [**this one**](https://8gwifi.org/sshfunctions.jsp), enter a passphrase and click **Generate-SSH-Keys**. Save the Public and Private keys somewhere temporarily, and don't forget the passphrase! You’ll need all three of these in a moment.
1. **UPDATE**: Github is deprecating the usage of RSA keys, so you’ll want to make sure that you select **ECDSA** for the **SSH-Keygen Algorithm**. This uses [elliptic curve cryptography](https://en.wikipedia.org/wiki/Elliptic-curve%5Fcryptography) and is more secure than RSA.
2. From [**Github**](https://github.com), click your **profile icon** and go to **Settings**.
3. In the **Access** section on the left of the page, click on [**SSH and GPG keys**](https://github.com/settings/keys).
4. Click the green [**New SSH key**](https://github.com/settings/ssh/new) button at the top of the page, next to the **SSH keys** section header.
5. Give your new SSH key a title like "_ServiceNow {instance name}_" and paste the **Public key** into the **Key** field, then click the green **Add SSH key** button.
6. In your ServiceNow instance, navigate to the **Credentials** \[`discovery_credentials`\] table, and click **New**. This will take you to an Interceptor page with a list of options for the credential type.
7. For the **type**, scroll to the bottom of the list, and click on **SSH Private Key Credentials**.
8. Name the credential record something meaningful, so you won’t forget which Github account it corresponds to. Enter your Github **username**, your Github **password**, the **SSH passphrase**, and the **SSH private key** you generated in **step 1**.
9. **Save** the Credential record.
# Changing Your Application Repository/URL
Now that you’ve got your credential record sorted out and linked up with Github, let’s change your application’s repo URL!
1. Open up **Studio** in ServiceNow. Commit all changes to your old source control repo, and export your app to XML as a backup -- _just in case_.
1. To export your app to XML, follow [these steps](https://docs.servicenow.com/bundle/sandiego-application-development/page/build/applications/task/t%5FPublishApplicationsToAnUpdateSet.html), then navigate to the Update Set, close it, and click **Export to XML** in the **Related Links** UI Actions.
2. **Navigate** to the `**sys_repo_config**` table (_you can just enter_ `**_sysrepoconfig.list_**` _into the Application Navigator filter bar and press Enter_)
3. Find any repo config records that are **associated with your application** (`_sysapp={YOURAPPSYSID}_`).
4. **Check the box** next to the repo your application is currently associated with, and from the **Actions** drop-down menu below the list (_or above it, if you’re on the new Polaris UI_), choose **Delete**.
1. You’ll probably be notified that some number of **Source Control Branch** records will be deleted as well as possibly some **Tags** and other related records. This is fine.
5. Open ServiceNow's **Application Studio** (or **refresh** the page if you already had it open)
6. Click the **Source Control** menu at the top, and you'll see that only **Link to Source Control** is available. This means the application is no longer linked to your old repo! (That’s good.)
7. Click **Link to Source Control** and [follow the steps as normal](https://docs.servicenow.com/csh?topicname=t%5FLinkAnApplicationToSourceControl.html&version=latest) once you have the new Git repo set up.
That’s it! If you found this article helpful, please consider [**subscribing**](https://snprotips.com/subscribe). We tend to only send out emails a few times a year _at most_. Feel free to also follow me on [**Twitter**](https://twitter.com/TheTimWoodruff) and [**LinkedIn**](https://li.snc.guru), if you feel so inclined. I’d love to hear what you thought of this article, and if you have any feedback!
Thanks for reading!
---
## Subscribe
Sign up with your email address to receive news and updates.
First Name Last Name
Email Address Sign Up
We respect your privacy.
Thank you!
---
* [ January 2026](https://snprotips.com/blog?month=01-2026)
* Jan 8, 2026 [Flow Designer vs. Scripting - REST Message Performance](https://snprotips.com/blog/)
* [ September 2025](https://snprotips.com/blog?month=09-2025)
* Sep 29, 2025 [Find Filthy Inefficient Single-Record Queries FAST](https://snprotips.com/blog/)
* Sep 14, 2025 [Communicating Changes to Your Users (& Setting Default User Preferences in ServiceNow)](https://snprotips.com/blog/)
* [ March 2025](https://snprotips.com/blog?month=03-2025)
* Mar 24, 2025 [Calculate Distance Between Two Locations in ServiceNow (without an API call!)](https://snprotips.com/blog/)
* Mar 11, 2025 [5 Ways to Check your ServiceNow Instance for DANGEROUS CODE in Less Than 5 minutes](https://snprotips.com/blog/)
* [ March 2024](https://snprotips.com/blog?month=03-2024)
* Mar 28, 2024 [How to Identify Duplicate Records by Multiple Fields in ServiceNow](https://snprotips.com/blog/)
* Mar 7, 2024 [How to Merge Personal & Company ServiceNow Accounts](https://snprotips.com/blog/)
* [ February 2024](https://snprotips.com/blog?month=02-2024)
* Feb 12, 2024 [5 Lessons About Programming From Richard Feynman](https://snprotips.com/blog/)
* [ July 2023](https://snprotips.com/blog?month=07-2023)
* Jul 5, 2023 [Managing Instance-Specific System Properties for Dev/Test/Prod in ServiceNow](https://snprotips.com/blog/)
* [ April 2023](https://snprotips.com/blog?month=04-2023)
* Apr 28, 2023 [Your ACLs and Business Rules are Broken (Here's How to Fix Them)](https://snprotips.com/blog/)
* [ December 2022](https://snprotips.com/blog?month=12-2022)
* Dec 13, 2022 [ServiceNow Developers: BE THE GUIDE!](https://snprotips.com/blog/)
* [ October 2022](https://snprotips.com/blog?month=10-2022)
* Oct 19, 2022 [A Faster, More Efficient Client-side GlideRecord (Free tool!)](https://snprotips.com/blog/)
* Oct 9, 2022 [Animated Loading Message & Collapsible Details on ServiceNow Form or Field (Client-side)](https://snprotips.com/blog/)
* [ August 2022](https://snprotips.com/blog?month=08-2022)
* Aug 23, 2022 [Using .addJoinQuery() & How to Query Records with Attachments in ServiceNow](https://snprotips.com/blog/)
* Aug 18, 2022 [Free, Simple URL Shortener for ServiceNow Nerds (snc.guru)](https://snprotips.com/blog/)
* Aug 16, 2022 [How to Get and Parse ServiceNow Journal Entries as Strings/HTML](https://snprotips.com/blog/)
* Aug 14, 2022 [New tool: Get Latest Version of ServiceNow Docs Page](https://snprotips.com/blog/)
* [ March 2022](https://snprotips.com/blog?month=03-2022)
* Mar 4, 2022 [How to Set or Change ServiceNow Application's Repository URL, Credentials, or SSH Key](https://snprotips.com/blog/)
* [ February 2022](https://snprotips.com/blog?month=02-2022)
* Feb 7, 2022 [How to return a CSV file from a Scripted REST API (SRAPI) in ServiceNow](https://snprotips.com/blog/)
* [ May 2021](https://snprotips.com/blog?month=05-2021)
* May 3, 2021 [Adding a Guided Setup to Your ServiceNow Application](https://snprotips.com/blog/)
* [ April 2021](https://snprotips.com/blog?month=04-2021)
* Apr 27, 2021 [Use Automated Tests to Validate "Guided Setup" Completion & Functionality.](https://snprotips.com/blog/)
* [ February 2021](https://snprotips.com/blog?month=02-2021)
* Feb 11, 2021 ["Processors", SRAPIs, and How to Run a Script and Redirect a User From a URL in ServiceNow](https://snprotips.com/blog/)
* [ November 2020](https://snprotips.com/blog?month=11-2020)
* Nov 17, 2020 [SN Guys is now part of Jahnel Group!](https://snprotips.com/blog/)
* [ September 2020](https://snprotips.com/blog?month=09-2020)
* Sep 14, 2020 [Better ServiceNow Notifications (& Another FREE Tool!)](https://snprotips.com/blog/)
* [ July 2020](https://snprotips.com/blog?month=07-2020)
* Jul 31, 2020 [Debugging Client & Catalog Client Scripts in ServiceNow](https://snprotips.com/blog/)
* [ January 2020](https://snprotips.com/blog?month=01-2020)
* Jan 20, 2020 [Getting Help from the ServiceNow Community](https://snprotips.com/blog/)
* [ December 2019](https://snprotips.com/blog?month=12-2019)
* Dec 18, 2019 [Can ServiceNow Script Includes Use the "current" Variable?](https://snprotips.com/blog/)
* [ November 2019](https://snprotips.com/blog?month=11-2019)
* Nov 18, 2019 [Handling 'text/plain' and Other Unsupported Content Types in ServiceNow Scripted REST APIs](https://snprotips.com/blog/)
* [ April 2019](https://snprotips.com/blog?month=04-2019)
* Apr 21, 2019 [Understanding Attachments in ServiceNow](https://snprotips.com/blog/)
* Apr 10, 2019 [Using Custom Search Engines in Chrome to Quickly Navigate ServiceNow](https://snprotips.com/blog/)
* Apr 4, 2019 [Set Catalog Variables from URL Params (Free tool)](https://snprotips.com/blog/)
* Apr 1, 2019 [Outlook for Android Breaks Email Approvals (+Solution)](https://snprotips.com/blog/)
* [ March 2019](https://snprotips.com/blog?month=03-2019)
* Mar 11, 2019 [GlideFilter is Broken - Free Tool: “BetterGlideFilter”](https://snprotips.com/blog/)
* [ February 2019](https://snprotips.com/blog?month=02-2019)
* Feb 27, 2019 [Making Update Sets Smarter - Free Tool](https://snprotips.com/blog/)
* [ November 2018](https://snprotips.com/blog?month=11-2018)
* Nov 29, 2018 [How to Learn ServiceNow](https://snprotips.com/blog/)
* Nov 6, 2018 [ServiceNow & ITSM as a Career?](https://snprotips.com/blog/)
* [ October 2018](https://snprotips.com/blog?month=10-2018)
* Oct 19, 2018 [Asynchronous onSubmit Catalog/Client Scripts in ServiceNow](https://snprotips.com/blog/)
* Oct 11, 2018 [How to do Massive, Slow Database Operations Efficiently With Event-Driven Recursion](https://snprotips.com/blog/)
* [ September 2018](https://snprotips.com/blog?month=09-2018)
* Sep 18, 2018 [Broken Queries & Query Business Rules in ServiceNow](https://snprotips.com/blog/)
* Sep 7, 2018 [JournalRedactor - Easily Redact or Delete Journal Entries in ServiceNow!](https://snprotips.com/blog/)
* [ July 2018](https://snprotips.com/blog?month=07-2018)
* Jul 23, 2018 [Admin Duty Separation with a Single Account](https://snprotips.com/blog/)
* [ June 2018](https://snprotips.com/blog?month=06-2018)
* Jun 19, 2018 [Improving Performance on Older Instances with Table Rotation](https://snprotips.com/blog/)
* Jun 4, 2018 [New Free Tool: Login Link Generator](https://snprotips.com/blog/)
* [ May 2018](https://snprotips.com/blog?month=05-2018)
* May 29, 2018 [Learning ServiceNow: Second Edition!](https://snprotips.com/blog/)
* [ April 2018](https://snprotips.com/blog?month=04-2018)
* Apr 17, 2018 [Upgrading From Express to Enterprise: What's Missing](https://snprotips.com/blog/)
* Apr 12, 2018 [If a Genie Gave Me Three Wishes, I'd Use Them All to "Fix" Scope](https://snprotips.com/blog/)
* [ March 2018](https://snprotips.com/blog?month=03-2018)
* Mar 19, 2018 [Service Catalog "Try in Portal" button](https://snprotips.com/blog/)
* Mar 15, 2018 [Video: Custom Output Transition Conditions From a Single Workflow (Script) Activity](https://snprotips.com/blog/)
* [ February 2018](https://snprotips.com/blog?month=02-2018)
* Feb 11, 2018 [We have a new book! ](https://snprotips.com/blog/)
* [ November 2017](https://snprotips.com/blog?month=11-2017)
* Nov 6, 2017 [Requiring Attachments (& Other Miracles) in Service Portal](https://snprotips.com/blog/)
* [ September 2017](https://snprotips.com/blog?month=09-2017)
* Sep 12, 2017 [Handling TimeZones in ServiceNow (TimeZoneUtil)](https://snprotips.com/blog/)
* [ July 2017](https://snprotips.com/blog?month=07-2017)
* Jul 27, 2017 [How to Enable DOM Manipulation in ServiceNow Service Portal Catalog Client Scripts](https://snprotips.com/blog/)
* [ June 2017](https://snprotips.com/blog?month=06-2017)
* Jun 25, 2017 [What's New in ServiceNow: Jakarta (Pt. 1)](https://snprotips.com/blog/)
* Jun 4, 2017 [Powerful Scripted Text Search in ServiceNow](https://snprotips.com/blog/)
* [ May 2017](https://snprotips.com/blog?month=05-2017)
* May 9, 2017 [Work at Lightspeed: ServiceNow's Plan for World Domination](https://snprotips.com/blog/)
* [ April 2017](https://snprotips.com/blog?month=04-2017)
* Apr 9, 2017 [Avoiding Pass-By-Reference Using getValue() & setValue()](https://snprotips.com/blog/)
* Apr 4, 2017 ["Learning ServiceNow" is Now Available for Purchase!](https://snprotips.com/blog/)
* [ March 2017](https://snprotips.com/blog?month=03-2017)
* Mar 12, 2017 [reCAPTCHA in ServiceNow CMS/Service Portal](https://snprotips.com/blog/)
* [ December 2016](https://snprotips.com/blog?month=12-2016)
* Dec 20, 2016 [Pro Tip: Use updateMultiple() for Maximum Efficiency! ](https://snprotips.com/blog/)
* Dec 2, 2016 [We're Writing a Book! ](https://snprotips.com/blog/)
* [ November 2016](https://snprotips.com/blog?month=11-2016)
* Nov 10, 2016 [Chrome Extension: Load in ServiceNow Frame](https://snprotips.com/blog/)
* [ September 2016](https://snprotips.com/blog?month=09-2016)
* Sep 7, 2016 [Force-Include Any Record Into an Update Set](https://snprotips.com/blog/)
* Sep 1, 2016 [GlideRecord Pagination - Page through your GlideRecord query](https://snprotips.com/blog/)
* [ July 2016](https://snprotips.com/blog?month=07-2016)
* Jul 17, 2016 [Granting Temporary Roles/Groups in ServiceNow](https://snprotips.com/blog/)
* Jul 15, 2016 [Scripted REST APIs & Retrieving RITM Variables via SRAPI](https://snprotips.com/blog/)
* [ May 2016](https://snprotips.com/blog?month=05-2016)
* May 17, 2016 [What's New in Helsinki?](https://snprotips.com/blog/)
* [ April 2016](https://snprotips.com/blog?month=04-2016)
* Apr 27, 2016 [Customizing UI16 Through CSS and System Properties](https://snprotips.com/blog/)
* Apr 5, 2016 [ServiceNow Versions: Express Vs. Enterprise](https://snprotips.com/blog/)
* [ March 2016](https://snprotips.com/blog?month=03-2016)
* Mar 28, 2016 [Update Set Collision Avoidance Tool: V2](https://snprotips.com/blog/)
* Mar 18, 2016 [ServiceNow: What's New in Geneva & UI16 (Pt. 2)](https://snprotips.com/blog/)
* [ February 2016](https://snprotips.com/blog?month=02-2016)
* Feb 22, 2016 [Reference Field Auto-Complete Attributes](https://snprotips.com/blog/)
* Feb 6, 2016 [GlideRecord & GlideAjax: Client-Side Vs. Server-Side](https://snprotips.com/blog/)
* Feb 1, 2016 [Make Your Log Entries Easier to Find](https://snprotips.com/blog/)
* [ January 2016](https://snprotips.com/blog?month=01-2016)
* Jan 29, 2016 [A Better, One-Click Approval](https://snprotips.com/blog/)
* Jan 25, 2016 [Quickly Move Changes Between Update Sets](https://snprotips.com/blog/)
* Jan 20, 2016 [Customize the Reference Icon Pop-up](https://snprotips.com/blog/)
* Jan 7, 2016 [ServiceNow: Geneva & UI16 - What's new](https://snprotips.com/blog/)
* Jan 4, 2016 [Detect/Prevent Update Set Conflicts Before They Happen](https://snprotips.com/blog/)
* [ December 2015](https://snprotips.com/blog?month=12-2015)
* Dec 28, 2015 [SN101: Boolean logic and ServiceNow's Condition Builder](https://snprotips.com/blog/)
* Dec 17, 2015 [Locate any record in any table, by sys\_id in ServiceNow](https://snprotips.com/blog/)
* Dec 16, 2015 [Detecting Duplicate Records with GlideAggregate](https://snprotips.com/blog/)
* Dec 11, 2015 [Array.indexOf() not working in ServiceNow - Solution! ](https://snprotips.com/blog/)
* Dec 2, 2015 [Understanding Dynamic Filters & Checking a Record Against a Filter Using GlideFilter](https://snprotips.com/blog/)
* [ October 2015](https://snprotips.com/blog?month=10-2015)
* Oct 20, 2015 [Bookmarklet: Load the current page in the ServiceNow frame](https://snprotips.com/blog/)
* [ August 2015](https://snprotips.com/blog?month=08-2015)
* Aug 27, 2015 [Easily Clone One User's Access to Another User](https://snprotips.com/blog/)
https://snprotips.com/blog/2022/3/4/how-to-change-servicenow-applications-repositoryurl