2017-04-26 33 views
1

我已經在heroku中部署了一個github項目。然後我用我的電腦成功克隆了這個項目heroku slugs:download -a newocas在heroku中部署一些更改時無法編譯python(Permission denied!)

現在,在做了一些更改並將項目部署回heroku後,一次又一次地產生相同的錯誤。

我正在使用git bash進行提交和部署。這是我的錯誤信息:

[email protected] MINGW32 ~/newocas/app (master) 
 
$ git push heroku master 
 
Counting objects: 133, done. 
 
Delta compression using up to 4 threads. 
 
Compressing objects: 100% (125/125), done. 
 
Writing objects: 100% (133/133), 2.93 MiB | 229.00 KiB/s, done. 
 
Total 133 (delta 3), reused 0 (delta 0) 
 
remote: Compressing source files... done. 
 
remote: Building source: 
 
remote: 
 
remote: -----> Python app detected 
 
remote: /app/tmp/buildpacks/779a8bbfbbe7e1b715476c0b23fc63a2103b3e4131eda558669aba8fb5e6e05682419376144189b29beb5dee6d7626b4d3385edb0954bffea6c67d8cf622fd51/bin/steps/python: line 43: /app/.heroku/python/bin/pip: Permission denied 
 
remote: -----> Installing pip 
 
remote: -----> Installing requirements with pip 
 
remote:  /app/tmp/buildpacks/779a8bbfbbe7e1b715476c0b23fc63a2103b3e4131eda558669aba8fb5e6e05682419376144189b29beb5dee6d7626b4d3385edb0954bffea6c67d8cf622fd51/bin/steps/pip-install: line 5: /app/.heroku/python/bin/pip: Permission denied 
 
remote: !  Push rejected, failed to compile Python app. 
 
remote: 
 
remote: !  Push failed 
 
remote: Verifying deploy.... 
 
remote: 
 
remote: !  Push rejected to newocas. 
 
remote: 
 
To https://git.heroku.com/newocas.git 
 
! [remote rejected] master -> master (pre-receive hook declined) 
 
error: failed to push some refs to 'https://git.heroku.com/newocas.git'

,這裏是我的requirement.txt文件

Flask==0.10.1 future==0.16.0

我曾經嘗試這樣做 - Pip not found when deploying Django app to Heroku ,這 - Push rejected, failed to compile Python app,這 - Heroku push rejected, failed to compile Python/django app (Python 2.7)和這個 - Heroku/python failed to detect set buildpack

但仍然出現錯誤!

有人能幫助我在這個reagard

+0

'heroku logs'中的任何內容? – brennan

+0

在heroku日誌中構建失敗。同樣的錯誤也出現在那裏@bren –

回答

1

我已經解決了這個問題。我共享以下程序:

首先,在這種情況下使用heroku slugs:download -a newocas將不起作用。當使用slu downloaded下載應用程序時,以後無法連接到heroku。

因此,解決方案是使用git bash克隆pc中的應用程序,然後在做出任何更改後進行提交,然後將更改推送到heroku應用程序。

enter image description here

希望這將幫助其他人還有誰面臨同樣的情況。