Why do I keep getting a "Repository authentication failed, check credentials. Make sure the user has both read and write access" error message when I create a branch in studio signed in as system admin?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2017 06:21 AM
I am working on the NeedIt tutorial in the New to Service Now trainings. Although I was able to do the previous steps I am unable to create a branch in the studio. The instructions say:
Create a Branch from a Tag
- In Studio, open the Source Control menu and select the Create Branch menu item.
- Configure the Branch. Branch Name CreateNeedItApp Create from Tag: LoadForCreateNIAppModule
- Click the Create Branch button.
- Click the Close Dialog button.
- After the branch is created, the branch name appears in the Studio status bar (bottom right corner).
When I try to run this in studio it fails with the error message "Repository authentication failed, check credentials. Make sure the user has both read and write access' I have tried to sign in as various users that have read and write access but can't get it to work. Can anyone tell me what I'm doing wrong?
- Labels:
-
Studio
- 26,885 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2021 09:32 AM
Thank you so much! This worked as charm 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2021 06:55 AM
Thank you Scott, this have worked for me!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2022 04:10 AM
Really straight forward and very useful. Thank you for sharing!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2022 12:16 PM
Worked successfully 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2022 01:21 PM
This WAS how my repo was previously linked, however something changed either with ServiceNow or Github (again) and SSH was the only route that worked for my situation. I posted this elsewhere, but here's my original in case someone else ends up facing this issue:
--------
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 :).