beachball icon indicating copy to clipboard operation
beachball copied to clipboard

Cannot fetch remote in AzureDevOps CI pipeline when running beachball check

Open shaohaolin opened this issue 2 years ago • 2 comments

I set up a beachball check step in an AzureDevOps CI pipeline. The job is failing due to cannot fetch remote in the pipeline, I wonder if there is any setting / configuration to get this step working in Azure DevOps. The command is working in local dev machine.

image

shaohaolin avatar Jun 08 '22 00:06 shaohaolin

After digging a bit more on the error, this error is related to permissions issue on Azure DevOps.

The error message is

fatal: could not read Username for 'https://xxx.xxx.com': terminal prompts disabled ##[error]Bash exited with code '128'.

To fix this, a pipeline needs to have access to the system token.

Solution is to add a checkout session with persistCredentials set to true.

steps:
  - checkout: self
    persistCredentials: true

@kenotron Would you mind if I create a PR to include a documentation for setting up Azure DevOps pipeline? I noticed that #659 is including a Azure DevOps example.

shaohaolin avatar Jun 08 '22 20:06 shaohaolin

We also hit this and found we needed persistCredentials: true for AzDo pipelines.

rajsite avatar Jul 27 '22 20:07 rajsite