[英]The current deployment branch is ''main'', but nothing has been pushed to it
When following the Azure App Service PHP quick start guide you receive the below error;按照 Azure 应用服务 PHP 快速入门指南操作时,您会收到以下错误;
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)
The target deployment branch was set to 'main'
instead of main
despite following the instructions.尽管遵循了说明,但目标部署分支仍设置为
'main'
而不是main
。
Change改变
az webapp config appsettings set --name <app-name> --resource-group myResourceGroup --settings DEPLOYMENT_BRANCH='main'
To到
az webapp config appsettings set --name <app-name> --resource-group myResourceGroup --settings DEPLOYMENT_BRANCH=main
Note: I was using azure cli via cmd.exe except for the line setting php version as the Pipe character caused issues.注意:我通过 cmd.exe 使用 azure cli,但行设置 php 版本除外,因为 Pipe 字符导致了问题。 It would be interesting know if using Cloud Cli would have avoided the issue entirely.
知道使用 Cloud Cli 是否可以完全避免该问题会很有趣。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.