简体   繁体   中英

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;

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.

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. It would be interesting know if using Cloud Cli would have avoided the issue entirely.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM