Следуя краткому руководству по PHP службы приложений Azure, вы получаете следующую ошибку:
remote: The current deployment branch is ''main'', but nothing has been pushed to it
remote: Error - Changes committed to remote repository but deployment to website failed.
remote: Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
remote: at Kudu.Console.Program.PerformDeploy(String appRoot, String wapTargets, String deployer, String lockPath, IEnvironment env, IDeploymentSettingsManager settingsManager, TraceLevel level, ITracer tracer, ITraceFactory traceFactory, IOperationLock deploymentLock)
remote: at Kudu.Console.Program.Main(String[] args)
remote: Aborted (core dumped)
Решение проблемы
Целевая ветвь развертывания была установлена 'main'
вместо того, чтобы main
следовать инструкциям.
Сдача
az webapp config appsettings set --name <app-name> --resource-group myResourceGroup --settings DEPLOYMENT_BRANCH='main'
К
az webapp config appsettings set --name <app-name> --resource-group myResourceGroup --settings DEPLOYMENT_BRANCH=main
Примечание. Я использовал azure cli через cmd.exe, за исключением строки, устанавливающей версию php, поскольку символ Pipe вызывал проблемы. Было бы интересно узнать, помогло ли бы использование Cloud Cli полностью избежать этой проблемы.
Комментариев нет:
Отправить комментарий