Import Application from GitHub using SSH deploy key
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2020 08:20 AM
Hi,
I am trying import application from GitHub repository using SSH key. The public key is uploaded to GitHub as deploy key with read/write access. The private key is imported to ServiceNow as SSH Private Key credential. I am getting the error "Repository authentication failed, check credentials. Make sure the user has both read and write access" when importing the application. What is the proper information required? This are what I used:
Network protocol: SSH
URL: git@github.com:my_username/devtraining-needit-paris.git
Branch: master
MID Server Name: <blank>
Credential: my_ssh_private_key_credential
Thanks
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2020 01:29 PM
Were you ever able to get this working? Trying to set up source control with our enterprise GitHub instance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2020 05:41 PM
Please refer to https://docs.servicenow.com/bundle/paris-application-development/page/build/applications/task/t_Link...
I had the same issue and had to recreate my SSH private/public keys by creating them with the following:
ssh-keygen -t rsa -m PEM -b 4096 -C “email@address”
Hope this helps.
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2022 10:37 AM
Were you able to resolve this? I got this working in Rome, but now I am struggling getting it working in San Diego. I know that Github is trying to make rsa deprecated, but I don't believe ServiceNow supports the eid format yet.I also tried attaching the ssh key directly to my account and I still got the same error as above.
I ended up having to use basic auth with a basic token. Since it is on a PDI, I haven't submitted a HiWave ticket about it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2022 08:35 AM
I recently wrote a 'ServiceNow Pro Tips' article on this, which teaches you:
- How to change which GitHub / repository your ServiceNow application in Studio
- How to update your GitHub repo credentials in ServiceNow
- How to generate ECDSA SSH keys and link your ServiceNow application with GitHub using SSH (including the new GitHub rule against using insecure RSA keys) - since GitHub no longer supports basic auth or RSA SSH keys
- How to generate/link your SSH API key-pair with GitHub and ServiceNow, using your public/private keys
You can see the full article with detailed step-by-step instructions, here: https://snprotips.com/blog/2022/3/4/how-to-change-servicenow-applications-repositoryurl