Am getting the following error message in cmd line script while runing the pipeline in azure devops.
error: src refspec main does not match any error: failed to push some refs to 'https://dev.azure.com/DevendraPadhi/Project D/_git/Project D
error: pathspec 'main' did not match any file(s) known to git fatal: Cannot prompt because user interactivity has been disabled. fatal: Cannot prompt because user interactivity has been disabled. fatal: could not read Password for 'https://[email protected]/DevendraPadhi/Project D/_git/Project D': terminal prompts disabled
PLease help to overcome this
CodePudding user response:
CodePudding user response:
I can reproduce your issue:
The operations that Shamrai suggested is needed, but not enough.
You need 3 steps:
Step1, allow script to access OAuth token
Step2, give contribute permission to build service account.
Step3, use this commands to push back changes:
git push origin HEAD:main
(Please notice add the HEAD:)