0
votes

I was configuring TeamCity (running on Windows Server) for a new project of which the Git repository is hosted in Visual Studio Team Services. The configuration is similar to other projects that we host on there. However, this project does not seem to be able to fetch the repository, unlike the others. It is complaining about some missing git-upload-pack service.

The error I get when testing the connection:

Test connection failed in SomeProject :: Develop Build
List remote refs failed: cannot locate repository at https://***.visualstudio.com/DefaultCollection/_git/SomeProject: https://***.visualstudio.com/DefaultCollection/_git/SomeProject/info/refs?service=git-upload-pack not found

What could be the reason that this project encounters the error, but the other do not? Also, how could I fix it? Many thanks in advance.

2
Did you rename the repository name before?Cece Dong - MSFT

2 Answers

0
votes
  1. Make sure you install the latest TeamCity 9.0.3, which fixes some git connection error.

  2. If you rename the project befor. The fix is to edit .git/config in your project and make sure the remote URL for VSTS reflects the updated project name. git-upload-pack not found

0
votes

Turned out I forgot to give permissions to our BuildUser in Visual Studio Team Services. The BuildUser is linked to TeamCity, so TC was not able to fetch the repository.