Can't use personal access token with TFC Git VCS root Follow
I've been unable to setup a VCS root for a TFS 2018.3 (on premise) Git repo using a personal access token. I've tried in both TC 2019.1 and 2018.2.3.
-
I was able to create an Azure Dev Ops Connection to the TFS server using the PAT. I can click the little VS icon next to the repo URL field in the VCS settings and get a list of all repos on the TFS server. So I know the PAT works. But I have had no success using the PAT for authentication in a VCS Root.
-
My understanding is you should be able to use any username and the PAT as the password in the VCS settings, but I always get this error:
List remote refs failed: org.eclipse.jgit.errors.TransportException: <my repo url>: not authorized
-
If I use the real credentials of the account where the PAT was created, it works fine. But using the PAT as the password never works. Am I missing something or does this just not work? Has anyone been able to do this successfully?
Please sign in to leave a comment.
Hello,
Sorry for the late response. Are you able to use these credentials with a regular Git command line? If so, then they should work fine in TeamCity too.
I'm sorry too - not getting notified of comments for some reason. Anyway, yes, I can clone from commend line using the PAT. I run git clone from the command line, let the credential manager popup, enter "someone" as user and the PAT as password and it works. But I can't get it to work from TeamCity. In the VCS settings I've tried the same "someone" and PAT as credentials, just the PAT in the password field and just the PAT in the user field. Always get the same error mentioned above.
Hi Mitch!
We're able to reproduce the problem and indeed seems TeamCity doesn't handle PAT for hosted TFS correctly. I've assigned the bug report created by you on the next bugfix release. Thank you for reporting it.
Great, so at least I'm not crazy. Thanks for the help!