I am making changes to a file in my repository from the Azure DevOps pipeline. I am able to add and commit these changes however, I am having an issue running the git push command. I am working in a branch called develop where all my files are in the root directory.
azure-pipelines.yml
- task: PowerShell@2
  inputs:
    targetType: 'inline'
    script: |
        git config --global user.email "user@email.com"
        git config --global user.name "User Name"
        git add .
        git commit -m "Updated README"
        git push origin HEAD:develop
This gives me the error: [detached HEAD d646d26] Updated README 1 file changed, 3 insertions(+), 3 deletions(-) fatal: could not read Password for 'https://@dev.azure.com': terminal prompts disabled ##[error]PowerShell exited with code '1'.
Is this a permission issue, or am I pushing to the develop branch incorrectly? Also, is there a better/easier way to do this?