php - 从本地 git 部署 Azure php 错误 - 使用教程
问题描述
所以我是 azure 部署的新手,我尽量使用 microsoft 文档教程 https://docs.microsoft.com/en-us/azure/app-service/tutorial-php-mysql-app?pivots=platform -视窗
一切都很好,直到“部署到 Azure” 步骤:
git推送天蓝色主
remote: [ErrorException]
remote: Trying to access array offset on value of type null
remote: An error has occurred during web site deployment.
remote:
remote: composer failed
remote:
remote:
remote: Error - Changes committed to remote repository but deployment to website failed.
To https://phpmysqldemogs.scm.azurewebsites.net/phpMysqlDemoGS.git
部署中心 > 日志中的日志详细信息显示我使用详细日志提交失败
Command: bash deploy.sh
Creating app_offline.htm
KuduSync.NET from: 'C:\home\site\repository' to: 'C:\home\site\wwwroot'
Deleting app_offline.htm
Running composer install
[ErrorException]
Trying to access array offset on value of type null
An error has occurred during web site deployment.
composer failed
[ErrorException] \r\n Trying to access array offset on value of type null\r\nC:\Program Files (x86)\SiteExtensions\Kudu\95.30831.5373\bin\Scripts\starter.cmd bash deploy.sh
我尝试再次推送,它说“已经是最新的”
我试图从 azure 克隆 repo,执行 composer install 然后 php artisan serve ...它在本地工作,所以我认为问题出在部署配置中。任何人都可以帮助解决生产问题吗?
提前致谢。
解决方案
Error - Changes committed to remote repository but deployment to website failed.
当您推送与“azure”上的应用程序部署分支不匹配的本地分支时,会发生此错误。
- 要解决此错误,请验证当前分支是否为
master
. 要更改默认分支,请使用DEPLOYMENT_BRANCH
应用程序设置(请参阅更改部署分支)。
你也得到了Trying to access array offset on value of type null
错误,那是作曲家失败。
- 要解决此错误,您需要更新作曲家。
composer update
或者
php composer.phar update
推荐阅读
- javascript - 我可以在 JavaScript 上使用 setTimeout() 作为并行处理函数吗
- linux - Makefile:没有规则可以使“/constants.py”需要目标“/constants.py.in”。停止
- java - 404 未找到,即使我的映射是正确的,也有错误的 url
- amazon-web-services - Amazon Redshift 本地 sql 客户端连接错误
- operating-system - 比赛系统防止用户切换屏幕,如托业 IIG 比赛
- javascript - 如何将 node.js 文件中的变量导出到普通的 vanilla js 文件中
- javascript - 用 22 个单位和 3 个小数点限制文本
- javascript - uglify-js 是否支持 es6 及更高版本?
- tensorflow - 使用多层权重的正则化函数?
- ansible - 如何将 SSH 指纹添加到 Ansible 中的已知主机?