执行git push heroku master时遇到问题
$ git push heroku master
Counting objects: 291, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (278/278), done.
Writing objects: 100% (287/287), 2.95 MiB | 27.00 KiB/s, done.
Total 287 (delta 55), reused 1 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> PHP app detected
remote: -----> No runtime required in composer.json, defaulting to PHP 5.6.4.
remote: -----> Installing system packages...
remote: - PHP 5.6.4
remote: - Apache 2.4.10
remote: - Nginx 1.6.0
remote: -----> Installing PHP extensions...
remote: - zend-opcache (automatic; bundled)
remote: -----> Installing dependencies...
remote:
remote: ! ERROR: File '/composer.phar' isn't executable; please 'chmod +x'!
remote:
remote:
remote: ! Push rejected, failed to compile PHP app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to safe-forest-7658.
remote:
To https://git.heroku.com/safe-forest-7658.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/safe-forest-7658.git'
我也反对Error on deploy my app to heroku
我正在通过'composer update'更新作曲家,并尝试'php composer.hhar update'。但之后会出现这个问题。
答案 0 :(得分:5)
我得到了解决方案。 实际上composer.phar只需要第一次。所以只需将其删除并运行即可 git add。 git commit -m' composer.phar已删除' git push heroku master