Git pull 错误:来自 Heroku 的“致命:无法找到远程引用主机”

2023-12-22

我在 heroku 上上传了我的应用程序。但我面临一些问题。问题是什么:致命:“priroda”似乎不是 git 存储库?

~/priroda$ git pull
fatal: 'priroda' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

~/priroda$ git remote -v
    heroku  [email protected] /cdn-cgi/l/email-protection:secure-anchorage-3129.git (fetch)
    heroku  [email protected] /cdn-cgi/l/email-protection:secure-anchorage-3129.git (push)
    origin  priroda (fetch)
    origin  priroda (push)

当我添加此命令时: git push heroku master 我收到很多错误:

~/priroda$ git remote add origin [email protected] /cdn-cgi/l/email-protection:secure-anchorage-3129.git

~/priroda$ git pull origin master
Initializing repository, done.
fatal: Couldn't find remote ref master

~/priroda$ git push heroku master
Initializing repository, done.
Counting objects: 117, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (104/104), done.
Writing objects: 100% (117/117), 126.46 KiB, done.
Total 117 (delta 16), reused 0 (delta 0)

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.6.3
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
       Your Gemfile lists the gem pg (>= 0) more than once.
       You should probably keep only one of them.
       While it's not a problem now, it could cause errors if you change the version of just one of them later.
       Fetching gem metadata from https://rubygems.org/.......
       Fetching additional metadata from https://rubygems.org/..
       Installing multi_json 1.10.1
       Installing rake 10.3.2
       Installing i18n 0.6.9
       Installing builder 3.0.4
       Installing journey 1.0.4
       Installing erubis 2.7.0
       Installing hike 1.2.3
       Installing rack 1.4.5
       Installing tilt 1.4.1
       Installing mime-types 1.25.1
       Installing polyglot 0.3.5
       Installing arel 3.0.3
       Installing acts_as_indexed 0.8.3
       Installing tzinfo 0.3.39
       Installing addressable 2.3.6
       Installing babosa 0.3.11
       Installing coffee-script-source 1.7.0
       Installing execjs 2.2.0
       Installing thor 0.19.1
       Installing orm_adapter 0.5.0
       Installing excon 0.37.0
       Installing bcrypt 3.1.7
       Installing netrc 0.7.7
       Installing json 1.8.1
       Using bundler 1.6.3
       Installing rubyzip 1.1.4
       Installing rails_serve_static_assets 0.0.2
       Installing rails_stdout_logging 0.0.3
       Installing sass 3.3.8
       Installing truncate_html 0.9.2
       Installing will_paginate 3.0.5
       Installing activesupport 3.2.18
       Installing rails-i18n 0.7.4
       Installing rack-cache 1.2
       Installing rack-test 0.6.2
       Installing rack-ssl 1.3.4
       Installing warden 1.2.3
       Installing dragonfly 0.9.15
       Installing sprockets 2.2.2
       Installing rest-client 1.6.7
       Installing treetop 1.4.15
       Installing launchy 2.4.2
       Installing coffee-script 2.2.0
       Installing bcrypt-ruby 3.1.5
       Installing heroku-api 0.3.18
       Installing uglifier 2.5.1
       Installing rdoc 3.12.2
       Installing rails_12factor 0.0.2
       Installing activemodel 3.2.18
       Installing mail 2.5.4
       Installing heroku 3.8.4
       Installing sdoc 0.3.20
       Installing actionpack 3.2.18
       Installing activerecord 3.2.18
       Installing activeresource 3.2.18
       Installing actionmailer 3.2.18
       Installing routing-filter 0.3.1
       Installing railties 3.2.18
       Installing awesome_nested_set 2.1.6
       Installing friendly_id 4.0.10.1
       Installing globalize 3.1.0
       Installing coffee-rails 3.2.2
       Installing refinerycms-i18n 2.1.0
       Installing devise 2.2.8
       Installing decorators 1.0.3
       Installing rails 3.2.18
       Installing jquery-rails 2.3.0
       Installing sass-rails 3.2.6
       Installing seo_meta 1.4.0
       Installing pg 0.17.1
       Installing refinerycms-core 2.1.2
       Installing refinerycms-dashboard 2.1.2
       Installing refinerycms-authentication 2.1.2
       Installing refinerycms-images 2.1.2
       Installing refinerycms-pages 2.1.2
       Installing refinerycms-resources 2.1.2
       Installing refinerycms-acts-as-indexed 1.0.0
       Installing refinerycms 2.1.2
       Your bundle is complete!
       Gems in the groups development and test were not installed.
       It was installed into ./vendor/bundle
       Post-install message from bcrypt-ruby:
       #######################################################
       The bcrypt-ruby gem has changed its name to just bcrypt.  Instead of
       installing `bcrypt-ruby`, you should install `bcrypt`.  Please update your
       dependencies accordingly.
       #######################################################
       Post-install message from rdoc:
       Depending on your version of ruby, you may need to install ruby rdoc/ri data:
       <= 1.8.6 : unsupported
       = 1.8.7 : gem install rdoc-data; rdoc-data --install
       = 1.9.1 : gem install rdoc-data; rdoc-data --install
       >= 1.9.2 : nothing to do! Yay!
       Post-install message from heroku:
       !    The `heroku` gem has been deprecated and replaced with the Heroku Toolbelt.
       !    Download and install from: https://toolbelt.heroku.com
       !    For API access, see: https://github.com/heroku/heroku.rb
       Post-install message from friendly_id:
       NOTE: FriendlyId 4.x breaks compatibility with 3.x. If you're upgrading
       from 3.x, please see this document:
       http://rubydoc.info/github/norman/friendly_id/master/file/WhatsNew.md
       Post-install message from globalize:
       Globalize has extracted versioning support to a separate gem named
       globalize-versioning. If you are using versioning (with paper_trail
       or any other versioning gem), please add the line
       "gem 'globalize-versioning'" to your Gemfile and go to the github
       page at globalize/globalize-versioning if you encounter any problems.
       Note that the globalize-versioning gem does not delegate versions to
       the translation table, so you will have to update your syntax to
       the form: `post.translation.versions`. See the globalize-versioning
       readme for details.
       Bundle completed (25.95s)
       Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       Connecting to database specified by DATABASE_URL
       rake aborted!
       PG::ConnectionBad: could not connect to server: Connection refused
       Is the server running on host "127.0.0.1" and accepting
       TCP/IP connections on port 5432?
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `initialize'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `new'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `connect'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/model_schema.rb:310:in `clear_cache!'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.18/lib/active_record/railtie.rb:103:in `block (2 levels) in <class:Railtie>'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:418:in `_run__2404055040551563881__prepare__433825113203608011__callbacks'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:405:in `__run_callback'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:385:in `_run_prepare_callbacks'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.18/lib/active_support/callbacks.rb:81:in `run_callbacks'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/reloader.rb:74:in `prepare!'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.18/lib/action_dispatch/middleware/reloader.rb:48:in `prepare!'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/railties-3.2.18/lib/rails/application/finisher.rb:47:in `block in <module:Finisher>'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/railties-3.2.18/lib/rails/initializable.rb:30:in `instance_exec'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/railties-3.2.18/lib/rails/initializable.rb:30:in `run'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/railties-3.2.18/lib/rails/initializable.rb:55:in `block in run_initializers'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/railties-3.2.18/lib/rails/initializable.rb:54:in `each'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/railties-3.2.18/lib/rails/initializable.rb:54:in `run_initializers'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/railties-3.2.18/lib/rails/application.rb:136:in `initialize!'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in `method_missing'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/config/environment.rb:5:in `<top (required)>'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `require'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `block in require'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:236:in `load_dependency'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:251:in `require'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/railties-3.2.18/lib/rails/application.rb:103:in `require_environment!'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/railties-3.2.18/lib/rails/application.rb:305:in `block (2 levels) in initialize_tasks'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.18/lib/sprockets/assets.rake:93:in `block (2 levels) in <top (required)>'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.18/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.18/lib/sprockets/assets.rake:23:in `invoke_or_reboot_rake_task'
       /tmp/build_c4c36556-f948-4d00-9345-e2e4903f11f4/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.18/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
       Tasks: TOP => environment
       (See full trace by running task with --trace)
 !
 !     Precompiling assets failed.
 !     Attempted to access a nonexistent database:
 !     https://devcenter.heroku.com/articles/pre-provision-database
 !

 !     Push rejected, failed to compile Ruby app

To [email protected] /cdn-cgi/l/email-protection:secure-anchorage-3129.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected] /cdn-cgi/l/email-protection:secure-anchorage-3129.git'
~/priroda$

您需要添加原始远程:

  1. 删除当前的一个

    git remote rm origin

  2. 添加 git 远程链接 ex:(https://[电子邮件受保护]/测试.git https://user@bitbucket.org/test.git or https://github.com/user/test.git https://github.com/user/test.git)

    git remote add origin link

  3. git pull origin master(或其他分行)

如果您尝试从 heroku 中提取应用程序

git pull heroku master

或者如果您尝试将新版本上传到 heroku

git push heroku master

[EDIT]

请遵循此tutorial https://devcenter.heroku.com/articles/quickstart,当您到达页面底部时,单击 Rails。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Git pull 错误:来自 Heroku 的“致命:无法找到远程引用主机” 的相关文章

  • 如何获取 git 存储库中所有文件的计数?

    如何获取 git 存储库中当前所有文件的计数 您可以使用以下命令获取 git 存储库中所有跟踪文件的计数 git ls files wc l 命令分解 The git ls files命令本身打印出存储库中所有跟踪文件的列表 每行一个 Th
  • GitPython 检查 git pull 是否更改了本地文件

    使用 GitPython 我只想在拉取后本地文件发生更改时才调用函数 例如 如果我在一台单独的计算机上进行推送 然后拉第一台计算机 它按预期工作 但不提供任何输出 理想的输出是已更改的文件列表 或者只是告诉我拉动是否有错误 没有拉动 因为分
  • Rails Active Storage - 保留现有文件/上传吗?

    我有一个 Rails 模型 has many attached files 默认情况下 通过 Active Storage 上传时 如果您上传新文件 它会删除所有现有上传内容并将其替换为新文件 我有一个控制器破解 由于多种原因 它不太理想
  • 将控制器操作处理为 JS 而不是 HTML

    所以我有以下形式 Follow 我试图
  • 为什么 Rails 应用程序在底部显示数据库信息?

    我创建了一个博客 每当我添加帖子时 帖子索引页面底部总会显示数据库中的记录列表 home html erb 像这样
  • 未知属性:user_id

    我在执行 current user stories build 期间收到错误未知属性 user id class User lt ActiveRecord Base has many stories class name Story for
  • 创建多个 git 分支的联合分支

    我希望能够在现有分支之上分层其他分支 并独立修改这些分支 这很有用 例如 允许将各个子项目的二进制文件统一到同一个项目中bin目录 一般来说 给定的文件仅存在于一层中 理想情况下 我想我会使用 unionfs 来完成此任务 但它必须以某种方
  • Rails 3 分页,will_paginate 与 Kaminari

    我的设置 Rails 3 0 9 Ruby 1 9 2 我正在为我的应用程序寻找分页解决方案 发现有一个新的宝石Kaminari与值得信赖的人相比will paginate 看起来像will paginate有一段时间没有更新了 但后来又以
  • Git 删除其他人从远程所做的最后提交

    所以 我的情况是 错误地 我已经授予某人对我的分支的承诺 现在 在我的本地 我已经进行了提交 当我尝试将其推送到远程时 它显示远程在前面 因为对方已经将他的代码推送到了这个分支并进行了多次提交 现在 我可以从远程删除这些提交而不将拉取到本地
  • Rails 4.1 环境变量未重新加载

    我创建了一个application yml文件在配置目录中并添加了一些键值对 即AWS REGION us east 1 我还添加了以下内容application rb读取文件并更新 ENV 哈希 if Rails env developm
  • Git:忽略版本控制文件

    gitignore 文件对于忽略一些我们不想控制的文件非常有用 不幸的是 当文件已处于版本控制之下时 它无法使用 例如 我的 gitignore 已添加到 git 中 文件可能与我的同事想要的不同 例如我想忽略 Vim 文件 每当我对此文件
  • Rails 如何使用 send_data 导出数据,然后重定向到新页面?

    我有一个 Rails 应用程序 允许用户下载生成的 CSV 文件 下载文件后 我想将用户重定向到新的 URL 或操作 有没有在 send data 之后进行重定向的技巧 我想做这样的事情 这不起作用 send data output typ
  • Rails3/will_paginate/Ajax - 下一个/上一个链接无法正常工作(这是一个错误吗?)

    我正在遵循 使用ajax分页 http railscasts com episodes 174 pagination with ajax railscast 用于我的 Rails 3 应用程序 一切似乎都运行良好 除了上一个和下一个链接根本
  • 在 python 中找不到 git 可执行文件

    我试图使用访问密钥克隆 git 存储库 但是当我尝试运行它时 它抛出一个异常 说找不到 git 可执行文件 但我已经安装了 git 并且 in it py 显示了正确的路径 C Program Files Git bin 我还安装了 git
  • <%=h ... %> 在 Rails 中意味着什么?

    I found here http api rubyonrails org classes ActionView Helpers RecordTagHelper html以下语法 什么是h means 它用于转义标签的输出以避免跨站点脚本
  • time_select 表单助手将新时间对象解释为 UTC,而不是配置的时区

    我遇到了对我来说似乎很简单的问题 但我无法弄清楚我做错了什么 在我的应用程序中 用户可以通过简单的 form for 添加他们的课程 他们可以输入课程讲座的开始时间和结束时间 如下所示 div class field Start Time
  • 无法在 Sqlite3 中添加默认值为 NULL 的 NOT NULL 列

    尝试将 NOT NULL 列添加到现有表时出现以下错误 为什么会发生这种情况 我尝试了 rake db reset 认为现有记录是问题所在 但即使重置数据库后 问题仍然存在 你能帮我解决这个问题吗 迁移文件 class AddDivisio
  • 使用nodegit切换分支/标签

    我整个早上都在尝试打开现有的存储库并使用 nodegit 更改分支或标签 文档内容很丰富 但似乎已经过时了 关于我做错了什么有什么想法吗 var NodeGit require nodegit var open NodeGit Reposi
  • git 清除远程仓库

    如果我将错误的初始提交 或多个 推送到远程存储库 并且只想清除 销毁它 我可以通过命令来完成吗 将其从服务器中完全删除非常重要 这样它就不会占用磁盘空间 例如 今天我推送了一个完整的 Visual Studio 项目 其中包含 dll sd
  • Rails:Passenger Standalone 适合生产部署吗?

    问题标题几乎概括了这一点 我找不到任何好的资源来概述使用 Phusion Passenger Standalone 进行 Rails 应用程序部署的优点 缺点 它与运行 Passenger Nginx 或 Passenger Apache

随机推荐