Using a github Personal Access Token with TortoiseSVN
Asked Answered
A

1

5

Github is turning off password access next month so I have generated a personal access token (PAT).

I then try to check out a new copy of an existing repo with the URL:

https://me:[email protected]/me/myrepo.git

where ghp_blahblahblah is my PAT. I get the following error:

Subversion encountered a serious problem. ... In file 'D:\Development\SVN\Releases\TortoiseSVN-1.14.1\ext\subversion\subversion\libsvn_client\util.c' line 96: assertion failed (svn_uri__is_ancestor(pathrev->repos_root_url, url))

I am running the latest version of TortoiseSVN 1.14.1.

Am I missing a step? Is there another way to make this work without resorting to SSH keys, which I don't want to do?

Thanks!

Anion answered 23/7, 2021 at 17:15 Comment(9)
Are you trying to use a Subversion client to talk to Github? I'm not sure that's going to work, try TortoiseGit.Knossos
@LasseV.Karlsen yes I am and it's been supported for years.Anion
Use the correct URL without putting your username and PAT into the URL - works perfectly for me. This particular error appears to be a bug, though.Emotional
@Emotional - how do I use the PAT if it's not in the URL? As the password when prompted by TortoiseSVN?Anion
As a side question..... why do you use an svn client to use a git repo? I know it's supported, as you said.... but I can't help but wonder.Saragossa
@Saragossa because I use it to access work svn repos and so I am familiar with it, I like it and I like being able to use the same tool for both. I am not a fan of git.Anion
@Anion yes, as a password when prompted. PAT is a password from the client side perspective.Emotional
@Anion I C. Just curious.Saragossa
I started an email thread in dev@ Apache Subversion regarding this crash when using username:password@ in the repository URL: lists.apache.org/thread.html/…Emotional
E
8

Use the correct URL without putting your username and PAT into the URL - works perfectly.

PAT is a password from the client side perspective. I have tested TortoiseSVN and the svn.exe command-line client and all of them are capable of using GitHub's personal access tokens for authentication (personal and private repositories). The only difference is that - when prompted for a password - you need to enter your personal access token. If the authentication fails, please make sure that you are entering the credentials correctly:

  • Username: your email
  • Password: your personal access token

Please, make sure that you copy the personal access token correctly (it is possible that it is surrounded with unnecessary whitespaces).

Emotional answered 25/7, 2021 at 7:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.