Github authentication failure "Repository authentication failed, check credentials. Make sure the user has both read and write access"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2022 05:27 AM
Hi,
I am trying to switch to a new git branch in ServiceNow studio and I am getting the following error
The repo cannot be accessed. Check URL, username, and password, and confirm user has read, write, and create branch access
I am using a PAT(Personal Access token) for authorisation. It was working fine previously (a month ago) until I had to restore my instance. I have tried using a new PAT with read & write access but still getting the error mentioned above.
- Labels:
-
Studio

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 11:09 AM
Having the same issue. I read on a different post that you might need to remove the app and import it back into Studio. I'm saving that as a last resort, but I'll update this if I figure out what's happening.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2022 01:13 PM
Woot, I got mine working, but the lack of documentation surrounding this issue is astounding.
Follow these steps EXACTLY: https://snprotips.com/blog/2022/3/4/how-to-change-servicenow-applications-repositoryurl
The reason I say exactly is because as you will see later, the ServiceNow documentation is outdated when stating, "The Now Platform supports only RSA private keys." - ServiceNow Documentation
A while back when Github updated their security requirements (Improving Git protocol security on GitHub), HTTPS basic auth and DSA keys were deprecated. As for RSA keys, one of the commenters in this Gist states, "the new GitHub rule against using insecure RSA keys - since GitHub no longer supports basic auth or RSA SSH keys", however I cannot attest to the validity of that particular statement and was/still remain too frazzled from troubleshooting this issue to investigate it further. So, although the Github article from above implies that you can still use RSA, I followed the article's advice to opt for better security and used ECDSA 512 when generating my key.
Originally I tried regenerating the O-Auth token and updating the credentials like usual. I also went as far as to completely remove and recreate credentials for this repository. When using the 'Test Credential' UI action, it successfully connected. However, when trying to publish to the application repository it would continually fail with the error: "The repo cannot be accessed. Check URL, username, and password, and confirm user has read, write, and create branch access." The article from SN Pro Tips fixed my issue, so a big thank you to the author, and I hope this post helps future peeps :).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2022 04:57 AM
Hi - I have tried all of these - and tried again today creating everything from scratch, but I am still not able to link to repository. I get the same error. Any idea what can be done?
I haven't been able to use the instance meaningfully since early August because I am unable to check in any code changes.