When working with deploying Azure Function Apps with Jenkins, I ran into an issue when trying to rebuild a Function App from scratch with the same name. I was unable to deploy the codebase via Pipeline due to the following error:
I was able to fix by doing the following:
SSH into the server.
Log in as the user that runs when running a Jenkins job (for example):
Access the user’s
.git-credentials file, and remove the reference to the pre-existing Function App SCM.
After doing this, try running the job again and ensure the issue has been solved.