0
votes

I have a Git repo hosted on a Gitlab on-premise server and I need to set up CI using TFS build. I Managed to set up a manual TFS build which successfully pulls the sources from my Git repo. I've add a CI trigger in my TFS build definition and the build actually triggers for each commit, but fails with the following error:

An exception occurred while polling the repository. Error: Microsoft.TeamFoundation.Build2.Server.Extensions.ExternalConnectorException: Basic authentication requires a secure connection to the server

Any ideas?

1
What about the error message is unclear? - Daniel Mann

1 Answers

0
votes

Based on the error message, this issue was caused by the authenticate problem.

How did you set the endpoint services?

Instead of using http on the "Services" endpoint you created on TFS for accessing your GitLab repository, please use HTTPS in the URL instead.

Besides to enable HTTPS access to your repository, remember to set a password on your GitLab account, then use that password along with your username (email address) on the "Services" endpoint set up on TFS.

You can also try to create a Personal Access Token in Gitlab and added it to the repository URL in the build definition (both in the Get Task and in the Service Endpoint Definition).

Then try to trigger the CI builds and test again.


UPDATE:

Based on my test with the HTTPS, everything works as expected for the CI when commit a change to Gitlab (Both for PAT and basic username and password ).

Tested this on TFS 2015 Update4.1 and TFS2017Update3.1 both working...

So, just try the solution I mentioned above.

enter image description here