I've recently starting seeing the above error with ever-increasing frequency on our build server. Nothing has changed in our TeamCity configuration during this period, so I'm guessing it might be changes at GitHub that are causing the error.

I've tried changing our VCS polling interval from 60s down to 600s in case GitHub was doing some kind of connection throttling, but there has been no affect.

Is it possible to make TeamCity less sensitive to connection timeouts?

有帮助吗?

解决方案

I've figured out the answer.

TeamCity has no issues - it's actually AZURE that has a problem.

For proof, try doing this in your server, where TC is installed.

(command line, of course)

C:\git\bin\git.exe clone https://github.com/libgit2/libgit2.git

and this should not work most of the time.

So AZURE has a networking bug and they know about it and are trying to resolve the issue.

This info was provided via GitHub after they worked with Azure to figure out what was going on.

Conclusion

You have to use SSH KEYS as a current workaround.

其他提示

We have made it less sensitive: now git-plugin will retry an operation in the case of ConnectException. To get this behaviour you need to install the latest build of git-plugin from teamcity.jetbrains.com. To do that put the zip from the build's artifacts into <TEAMCITY_DATA_DIR>/plugins and restart the server.

You've posted to few information for the question. It's better if you could email the team to teamcity-feedback@jetbrains.com with more details and debug logs from the TeamCity server

Some easy to check things: * you can open github.com from the server in browser * you can clone from github.com in the server from console

We've got this error all of sudden today (Feb 23, 2018).

Turns out GitHub.com deprecated some of the security algorithms in their ssh implementation.

Solutions:

  • switch to "https://..." URL in the affected VCS roots and provide your credentials for authentication
  • upgrade to the latest TeamCity version

Here's an announcement from JetBrains: https://teamcity-support.jetbrains.com/hc/en-us/community/posts/360000115644-Builds-using-GitHub-com-fail-with-VCS-errors-since-February-22-FIX-AVAILABLE

Switching to ssh helped us to avoid timeouts.

As @Pure.Krome says, you can use SSH KEYS to allow you to access the Azure TFS GIT URL, or you can modify the settings in "Alternative Credentials" by checking "Enable alternate credentials" so you can access the repository by just using a username and password.

First in Azure DevOps go to your project:

enter image description here

Then choose Security in the RHS menu:

enter image description here

Finally choose "Alternate Credentials" in the LHS menu and click the "Enable authentication alternate credentials" where you will then put in your username and password:

enter image description here

Please beware that this is less secure than using the SSH KEYS.

I got this issue even when using ssh. I realized that there was a firewall that was seeing all the ssh traffic as an ssh brute force attack. The firewall would then block the request.

A firewall rule was added to resolve the issue.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top