python - 在heroku中部署一些更改时无法编译python(权限被拒绝!)

标签 python git heroku git-bash

我在heroku中部署了github的项目。然后我使用 heroku slugs:download -a newocas

在我的电脑上成功克隆了该项目

现在,在进行一些更改并在将项目部署回 Heroku 时进行提交后,会一次又一次地产生相同的错误。

我使用 git bash 进行提交和部署。这是我的错误消息:

Sultan@Sultan-PC 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

但是还是出现错误!!!

有人可以在这方面帮助我

最佳答案

我已经解决了这个问题。我分享以下过程:

首先,在这种情况下,使用 heroku slugs:download -a newocas 将不起作用。当使用 slugs 下载应用程序后,它无法链接到 heroku。

因此,解决方案是使用 git bash 在电脑中克隆应用程序,然后在进行任何更改后进行提交,然后将更改推送到 heroku 应用程序。

enter image description here

关于python - 在heroku中部署一些更改时无法编译python(权限被拒绝!),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43632659/

相关文章:

python - 使用 Azure Durable Function 进行聚合

python - ElementNotInteractableException : Message: Element <a> could not be scrolled into view

ruby-on-rails-3 - heroku rake 需要 'rake/dsl_definition' 修复不起作用 + 破坏本地 rake

ruby-on-rails - 如何永久解锁 Google 帐户验证码以便在我的 heroku 应用程序中发送电子邮件?

python - 如何获取 Pandas 中数据框的移位索引值?

python - 启动 python 子进程有不同的行为,具体取决于启动器

Git 子模块/子树陷阱

git - `git diff`能否区分添加到branch2的部分和从branch1删除的部分?

git - 使用原型(prototype)代码将 Git 存储库重构为实际的可发布项目

heroku - 如何将子域指向 Heroku 应用程序,并将根域指向另一个 Heroku 应用程序?