我正在Heroku上部署我的php应用程序。
我收到此错误:
Writing objects: 100% (784/784), 1.38 MiB | 91.00 KiB/s, done.
Total 784 (delta 137), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> PHP app detected
remote: -----> Bootstrapping...
remote: -----> Installing platform packages...
remote: NOTICE: No runtime required in composer.json; requirements
remote: from dependencies in composer.lock will be used for selection
remote: - php (7.1.0)
remote: - apache (2.4.20)
remote: - nginx (1.8.1)
remote: -----> Installing dependencies...
remote:
remote: ! ERROR: File '/composer.phar' isn't executable; please 'chmod +x'!
remote:
remote: ! Push rejected, failed to compile PHP app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to secret-mountain-92838.
remote:
To https://git.heroku.com/secret-mountain-92838.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/secret-mountain-92838.git'
当我在每个地方导航时,我得到以下答案:
git add .
git commit -m 'composer.phar removed'
git push heroku master
我已经这样做了,但错误仍然存在。这是我第一次在Heroku上部署应用程序。
我正在使用
- php (7.1.0)
- apache (2.4.20)
- nginx (1.8.1)
答案 0 :(得分:0)
git update-index --chmod=+x composer.phar
(根据评论:ERROR: File '/composer.phar' isn't executable; please 'chmod +x'!)
答案 1 :(得分:-1)
你需要删除这个git文件。试试
git rm composer.phar
这是我的解决方案