0
votes

I'm trying to connect TeamCity to a Git instance on Visual Studio Online. I've followed all the correct processes and added alternative credentials. These credentials work as I have TeamCity connecting to a TFSC instance on Visual Studio online.

I can connect to the repository and push to it from GitExtensions so I know the repository is fine. I'm struggling to work out what I've done wrong.

My error is:

TF31002: Unable to connect to this Team Foundation Server:

https://myAccount.visualstudio.com/DefaultCollection/_git/TestTFSGit.

Team Foundation Server Url: https://myAccount.visualstudio.com/DefaultCollection/_git/TestTFSGit.

Possible reasons for failure include:

  • The name, port number, or protocol for the Team Foundation Server is incorrect.
  • The Team Foundation Server is offline.
  • The password has expired or is incorrect.

Technical information (for administrator):

The remote server returned an error: (404) Not Found.

The URL exists and resolves to my Visual Studio Online Git project. I have the following settings in the VCS root settings on TeamCity. Any help would be appreciated.

enter image description here

1
Do not configure it as Team Foundation Server, but instead configure it as Git.jessehouwing
Just tried that and it worked - could you post that as an answer and I'll tick it.Matt

1 Answers

2
votes

Team City means "Team Foundation Version Control" or TFVC when you select "Team Foundation Server". When connecting to a TFS hosted Git repository, you can select Git as Type of VCS instead.