In ADO with a YML pipeline, in a PowerShell task, on a MSFT hosted agent, I am running these commands, to initialize a folder with files, and push it to an existing (empty) repository in ADO.
> git init --initial-branch=main
> git config user.email "xxx"
> git config user.name "xxx"
> git add *
> git commit -m "xxx"
> git remote add origin https://[email protected]/DefaultCollection/$project/_git/$repository
> git push -u origin main
The error I am getting is:
enter image description here
##[error] to …
The commands run, but it looks like the “git push” throws an error. But it DOES UPLOAD THE FILES SUCCESSFULLY. I am unsure what the error is, pretty hard to google it, without any actual error. It does however fail my pipeline. I am unsure if this happens from a non-0 exit code, or something being written to err-out.
What’s the issue? What am I doing wrong? Or what can I do, for this to not fail my pipeline.
user16641677 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.