为什么我不能推到heroku? C:\Users\User\Desktop\AlveusBot>git-push-heroku-master:main 枚举对象:8,完成。 计数对象:100%(8/8),完成。 增量压缩最多使用16个线程 压缩对象:100%(7/7),完成。 写入对象:100%(8/8),1.12kib | 1.12mib/s,完成。 共8个(增量1),重复使用0个(增量0),包重复使用0个 远程:正在压缩源文件。。。完成。 远程:建筑源: 远程: 远程:-->应用程序与buildpack不兼容:https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz 远程:更多信息:https://devcenter.heroku.com/articles/buildpacks#detection-失败 远程: 遥控器:!推送失败 遥控器:! 遥控器:!##警告-已生成此代码的相同版本:36a9c86df5cf527e2e8571da73210e6d36a4fe7e 遥控器:! 遥控器:!我们检测到您已从版本为36a9c86df5cf527e2e8571da73210e6d36a4fe7e的源代码触发生成 遥控器:!至少两次。这种行为的一个常见原因是试图部署来自不同分支的代码。 遥控器:! 遥控器:!如果在分支上开发并通过git部署,则必须运行: 遥控器:! 遥控器:!git-push-heroku:main 遥控器:! 遥控器:!本文将详细介绍该行为: 遥控器:!https://devcenter.heroku.com/articles/duplicate-build-version 远程: 远程:正在验证部署。。。 远程: 遥控器:!拒绝推送至Alveusebot。 远程: 到https://git.heroku.com/alveusesbot.git ! [远程拒绝]主->主(拒绝预接收挂钩) 错误:无法将某些引用推送到'https://git.heroku.com/alveusesbot.git'

为什么我不能推到heroku? C:\Users\User\Desktop\AlveusBot>git-push-heroku-master:main 枚举对象:8,完成。 计数对象:100%(8/8),完成。 增量压缩最多使用16个线程 压缩对象:100%(7/7),完成。 写入对象:100%(8/8),1.12kib | 1.12mib/s,完成。 共8个(增量1),重复使用0个(增量0),包重复使用0个 远程:正在压缩源文件。。。完成。 远程:建筑源: 远程: 远程:-->应用程序与buildpack不兼容:https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz 远程:更多信息:https://devcenter.heroku.com/articles/buildpacks#detection-失败 远程: 遥控器:!推送失败 遥控器:! 遥控器:!##警告-已生成此代码的相同版本:36a9c86df5cf527e2e8571da73210e6d36a4fe7e 遥控器:! 遥控器:!我们检测到您已从版本为36a9c86df5cf527e2e8571da73210e6d36a4fe7e的源代码触发生成 遥控器:!至少两次。这种行为的一个常见原因是试图部署来自不同分支的代码。 遥控器:! 遥控器:!如果在分支上开发并通过git部署,则必须运行: 遥控器:! 遥控器:!git-push-heroku:main 遥控器:! 遥控器:!本文将详细介绍该行为: 遥控器:!https://devcenter.heroku.com/articles/duplicate-build-version 远程: 远程:正在验证部署。。。 远程: 遥控器:!拒绝推送至Alveusebot。 远程: 到https://git.heroku.com/alveusesbot.git ! [远程拒绝]主->主(拒绝预接收挂钩) 错误:无法将某些引用推送到'https://git.heroku.com/alveusesbot.git',git,heroku,Git,Heroku,我是git和heroku的新手,我不明白为什么会出现这个问题以及如何解决它。我在网上尝试了很多解决方案,但都没有成功。任何帮助都是非常有用的。它说此代码的同一版本已经生成,这可能意味着您尚未更新代码。你需要做一个提交 运行git status,查看您已暂存的内容。它应该有如何进行舞台表演的指导 然后运行带有描述的git commit-m“description”。它应该提交所有暂存文件 最后,运行您正在执行的命令,git push heroku master:main,以推送/更新对heroku

我是git和heroku的新手,我不明白为什么会出现这个问题以及如何解决它。我在网上尝试了很多解决方案,但都没有成功。任何帮助都是非常有用的。

它说
此代码的同一版本已经生成
,这可能意味着您尚未更新代码。你需要做一个提交

  • 运行
    git status
    ,查看您已暂存的内容。它应该有如何进行舞台表演的指导
  • 然后运行带有描述的git commit-m“description”。它应该提交所有暂存文件
  • 最后,运行您正在执行的命令,
    git push heroku master:main
    ,以推送/更新对heroku的更改。
    更多关于git的信息请访问

  • 该错误消息中有指向页面的链接,可以解释您遇到的问题。“应用程序与buildpack不兼容”错误远比警告更重要。没有注意到,我现在检查。无法对主要问题发表评论,因此我将在此处执行@你能告诉我你的代码是什么语言吗?我认为“不兼容”是指不支持的语言。您的语言是受支持的类型之一(Node.js、Ruby、Python、Java、PHP、Go、Scala、Clojure)?或者你有配置文件和/或托管服务器吗?@Aarav我的应用程序是python。我已经声明了构建包,但我不知道它还想要什么,另外一个错误也消失了。@David\u你可以有一个
    requirements.txt
    setup.py
    文件。错误似乎出现在构建源代码部分。或者你可能需要一个构建包。
    C:\Users\User\Desktop\AlveusBot>git push heroku master:main
    Enumerating objects: 8, done.
    Counting objects: 100% (8/8), done.
    Delta compression using up to 16 threads
    Compressing objects: 100% (7/7), done.
    Writing objects: 100% (8/8), 1.12 KiB | 1.12 MiB/s, done.
    Total 8 (delta 1), reused 0 (delta 0), pack-reused 0
    remote: Compressing source files... done.
    remote: Building source:
    remote:
    remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
    remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
    remote:
    remote:  !     Push failed
    remote:  !
    remote:  ! ## Warning - The same version of this code has already been built: 36a9c86df5cf527e2e8571da73210e6d36a4fe7e
    remote:  !
    remote:  ! We have detected that you have triggered a build from source code with version 36a9c86df5cf527e2e8571da73210e6d36a4fe7e
    remote:  ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
    remote:  !
    remote:  ! If you are developing on a branch and deploying via git you must run:
    remote:  !
    remote:  !     git push heroku <branchname>:main
    remote:  !
    remote:  ! This article goes into details on the behavior:
    remote:  !   https://devcenter.heroku.com/articles/duplicate-build-version
    remote:
    remote: Verifying deploy...
    remote:
    remote: !       Push rejected to alveusesbot.
    remote:
    To https://git.heroku.com/alveusesbot.git
     ! [remote rejected] master -> main (pre-receive hook declined)
    error: failed to push some refs to 'https://git.heroku.com/alveusesbot.git'