- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 07:48 AM
Hi all,
I'm trying to link a custom app to a repository in GitHub from Studio, but I'm getting a couple of different errors depending on the entries I make in this modal:
I've referred to this existing community post:
and the excellent instructions laid out here:
https://snprotips.com/blog/2022/3/4/how-to-change-servicenow-applications-repositoryurl
I've generated SSH authentication keys using ECDSA and added the details to my account in GitHub. I've created the credentials record in ServiceNow and I'm able to select it.
One thing I notice, that I'm unsure about: when I select SSH in the modal above, the placeholder text for the URL is ssh:// as shown, but the url I see in GitHub for the repository for SSH begins git@github.com. If I paste the URL as GitHub gives it, without the ssh prefix, I get this error when I attempt to finalise the link: "The operation encountered an unexpected error. Check the node log file". If I paste the link but include the ssh prefix I instead get this error: "Unsupported URL. The protocol must be http or https and the URL must be a valid repository".
Any advice on what may be going wrong, or what exact steps I need to take / what details I need to enter when creating the link to the repository?
I'm using a Washington DC instance (ServiceNow cloud hosted), and the GitHub account is a free personal account from github.com.
Thank you
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 08:42 AM
Hey,
So I've never used SSH before over HTTPS however I was able to set this up successfully by doing the following:
- On Windows, opened CMD and typed the following ssh-keygen -t rsa -m PEM -b 4096 -C “email@address” where the email address was my github email address
- Follow ssh-keygen steps to create a key-pair (name of key-pair, passphrase to secure, location etc)
- Navigated to https://github.com/settings/keys in my browser and created a 'New SSH key'
- Entered the public key information which can be found in the save directory with a .pub suffix.
- In ServiceNow, created a new ssh_private_key_credentials record with the following
- Username = Email address entered before
- Password & SSH passphrase set to the passphrase used to secure the key-pair
- SSH private key from the key file created. It'll begin with -----BEGIN RSA PRIVATE KEY ------
- In studio, used to the URL provided by Github git@github.com:<user>/<repo>.git
I did initially have an issue with the SSH passphrase (see below error from syslog table) however after re-entering there was no issue
The repo cannot be accessed. Check URL, username, and password, and confirm user has read, write, and create branch access: com.glide.sourcecontrol.SourceControlException: org.eclipse.jgit.api.errors.TransportException: git@github.com:trade12/SSHTestRepo.git: [ssh-connection]: Failed (RuntimeException) to execute: javax.security.auth.login.CredentialException: Missing password provider for encrypted resource

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 08:42 AM
Hey,
So I've never used SSH before over HTTPS however I was able to set this up successfully by doing the following:
- On Windows, opened CMD and typed the following ssh-keygen -t rsa -m PEM -b 4096 -C “email@address” where the email address was my github email address
- Follow ssh-keygen steps to create a key-pair (name of key-pair, passphrase to secure, location etc)
- Navigated to https://github.com/settings/keys in my browser and created a 'New SSH key'
- Entered the public key information which can be found in the save directory with a .pub suffix.
- In ServiceNow, created a new ssh_private_key_credentials record with the following
- Username = Email address entered before
- Password & SSH passphrase set to the passphrase used to secure the key-pair
- SSH private key from the key file created. It'll begin with -----BEGIN RSA PRIVATE KEY ------
- In studio, used to the URL provided by Github git@github.com:<user>/<repo>.git
I did initially have an issue with the SSH passphrase (see below error from syslog table) however after re-entering there was no issue
The repo cannot be accessed. Check URL, username, and password, and confirm user has read, write, and create branch access: com.glide.sourcecontrol.SourceControlException: org.eclipse.jgit.api.errors.TransportException: git@github.com:trade12/SSHTestRepo.git: [ssh-connection]: Failed (RuntimeException) to execute: javax.security.auth.login.CredentialException: Missing password provider for encrypted resource
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2024 09:44 AM
Hi Kieran,
Thanks for your reply, and for confirming the URL as git@github.com:<user>/<repo>.git. That's where I was getting "The operation encountered an unexpected error. Check the node log file". Interestingly in the logs, I was getting the same error as you, so I re-entered my passphrase in the credentials record and this time it worked! So I wonder if there's a peculiary thing happening with the passphrase when the credentials record first gets inserted? Anyway.... all working now, thank you 🙂