microsoft / azure-pipelines-agent

Azure Pipelines Agent 🚀
MIT License
1.7k stars 855 forks source link

[BUG]: 3.239.1 fails to connect to git #4814

Open tisonv opened 1 month ago

tisonv commented 1 month ago

What happened?

After updating from 3.238.0 to 3.239.1, all builds fail. Rollbacked to 3.238.0 and it works again

Versions

2.239.1 on Windows 2019

Environment type (Please select at least one enviroment where you face this issue)

Azure DevOps Server type

Azure DevOps Server (Please specify exact version in the textbox below)

Azure DevOps Server Version (if applicable)

Azure DevOps Server 2022.1 (AzureDevOpsServer_20240305.2)

Operation system

Windows Server 2019

Version controll system

Git

Relevant log output

git --config-env=http.extraheader=env_var_http.extraheader fetch --force --tags --prune --prune-tags --progress --no-recurse-submodules origin
fatal: unable to access 'https://XXXXX/Collection/YYY/_git/YYY/': schannel: next InitializeSecurityContext failed: Unknown error (0x80092013)
##[warning]Git fetch failed with exit code 128, back off 6,964 seconds before retry.
DmitriiBobreshev commented 1 month ago

Hi @tisonv, Thanks for the feedback. We suspect that the problem might be related to git extraheader, agent should remove it after the execution. Could you please check that the Agent have access to it with write permissions and you have nothing in it? Also could you please install a fresh agent from scratch to check will it works fine?

tisonv commented 1 month ago

Hello @DmitriiBobreshev ! Thanks for the reply The account running the service is an admin of the collection. I guess it should have all the required permission by default. The 3.239.1 agent is installed by hand from the zip from github (no automated upgrade from Azure DevOps. Azure DevOps and the agent have very limited internet access)

tisonv commented 1 month ago

I tested the 3.240.1 and the problem is no more. I suspect this has something to do with https://github.com/microsoft/azure-pipelines-agent/commit/04e4b9830a9582fbf5c5d9bbe7142caf4d9968e7 https://github.com/microsoft/azure-pipelines-agent/compare/v3.239.1...v3.240.1 There is no detail as why it was reverted though