0
votes

I have setup code in Azure DevOps Repository. I am using a self-hosted agent for pipelines. I have set up a pipeline to use Azure DevOps repository, but in the checkout, I'm getting below error.

I have tried by cleaning the work folder. Also, I have added "IgnoreCase=True" in specific work's config file.

##[debug]STDOUT/STDERR stream read finished.
##[debug]STDOUT/STDERR stream read finished.
##[debug]Finished process 14976 with exit code 1, and elapsed time 00:00:13.4575355.
##[error]Git checkout failed with exit code: 1
##[debug]Processed: ##vso[task.logissue type=error;]Git checkout failed with exit code: 1
##[debug]Processed: ##vso[task.complete result=Failed;]
##[debug]   at Agent.Plugins.Repository.GitSourceProvider.GetSourceAsync(AgentTaskPluginExecutionContext executionContext, RepositoryResource repository, CancellationToken cancellationToken)
   at Agent.Plugins.Repository.CheckoutTask.RunAsync(AgentTaskPluginExecutionContext executionContext, CancellationToken token)
   at Agent.PluginHost.Program.Main(String[] args)

I want checkout Azure DevOps Repository using a self-hosted agent.

1
You'd better updated with sharing the completed log. Until now, these log are too board to analyze. In addition, did your repos has submodule?Merlin Liang - MSFT
@MerlinLiang-MSFT Yes repos have submodule. But when I am using "Azure Pipelines" agent at the time I am not getting any error in checkout.ankit thakkar
Got it, the submodule should be the issue caused. Could you mind share the full debug log?Merlin Liang - MSFT
@MerlinLiang-MSFT Full Log will contain some confidential information So I can not share it. But it's fine if I will use "Azure Pipelines" agent, but when I am using this agent then in SonarQube Analysis I am getting a proxy error. " Agent job 1: "[SQ] API GET '/api/server/version' failed, error was: {"code":"ETIMEDOUT","errno":"ETIMEDOUT","syscall":"connect","address":"XXXXXX","port":XXX}"" If you can help in this thing it will grate for us. In summary our goal is to run sonar analysis from Azure DevOps Pipeline.ankit thakkar

1 Answers

0
votes

at Agent.Plugins.Repository.GitSourceProvider.GetSourceAsync(AgentTaskPluginExecutionContext executionContext, RepositoryResource repository, CancellationToken cancellationToken)

According to this error message, I check its corresponding source function code: GetSourceAsync. Then from comment I confirmed that this repos has submodule. So this issue caused by did not enable Checkout Submodule optional before build.

According to the Checkout log shared privately:

enter image description here

The value of checkoutSubmodules is False, this is why the agent could not install the project which contain submodule, and throw the error message.

To solve it, just go Get Source page, then enable the optional: Checkout submodules:

enter image description here