Git Remote Access in Azure Pipelines, possible?
I've had a similar issue with git commands in Azure Pipelines.  The reason is that any commands that access the origin server, such as git push need to done by a user that has the credentials to do so.  In your situation, your PowerShell script is running in the user context of Project Collection Build Service (yourProjectName) and it does not have the permissions to contribute to your repo by default.

See this answer, I think it will fix you up: https://stackoverflow.com/a/56542631/11767897