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?

5vetlana
Tera Contributor

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

  1. In Studio, open the Source Control menu and select the Create Branch menu item.
  2. Configure the Branch.               Branch Name CreateNeedItApp               Create from Tag: LoadForCreateNIAppModule
  3. Click the Create Branch button.
  4. Click the Close Dialog button.
  5. After the branch is created, the branch name appears in the Studio status bar (bottom right corner).The branch name appears in the status bar on the lower 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?

71 REPLIES 71

Aziz1
Kilo Contributor

I got same issue, Simply go to github.com and reset your password (in case you forgot it) then use the resettled creds in Servicenow instance. Source control>edit repository configuration and it will work.

KartikCNow
Kilo Contributor

Hey! I had the same issue. Simply go on your Github account and turn of 2 factor authentication. Once you do that, it creates a branch!

(P.S. Don't forget to turn on the 2FA after creating the branch)

Scott71
Tera Contributor

As described by @jasonstephens the steps are as follows and are preferable to disabling 2FA as this is unnecessary.

1) Log into GitHub account.

2) Browse to account settings.

find_real_file.png

 

3) Select Personal access tokens then Generate new token.

find_real_file.png

4) Assign name and permission for new token.

find_real_file.png

5) Generate new token (bottom of page).

find_real_file.png

6) Copy the newly generate token (this will not be viewable again so should be stored safely for future use).

find_real_file.png

7) Now the token is generated, within ServiceNow use your GitHub username with the generated token instead of your password.

find_real_file.png

Thank´s Scott this works for me!

Amitra
Mega Contributor

This should me marked as correct answer.