Ruby on rails git push heroku master因“失败”;HTTP 400 curl 22请求的URL返回错误;

Ruby on rails git push heroku master因“失败”;HTTP 400 curl 22请求的URL返回错误;,ruby-on-rails,git,heroku,Ruby On Rails,Git,Heroku,我正在尝试推出只显示“hello,world”的rails应用程序。 然后我遇到了如下错误。 我想知道如何解决这个问题 $git推送heroku主机 枚举对象:88,完成。 计数对象:100%(88/88),完成。 增量压缩最多使用4个线程。 压缩对象:100%(73/73),完成。 写入对象:100%(88/88),22.29 KiB | 1.71 MiB/s,完成。 总计88(增量2),重复使用0(增量0) 错误:RPC失败;HTTP 400 curl 22请求的URL返回错误:400错误请

我正在尝试推出只显示“hello,world”的rails应用程序。
然后我遇到了如下错误。
我想知道如何解决这个问题

$git推送heroku主机
枚举对象:88,完成。
计数对象:100%(88/88),完成。
增量压缩最多使用4个线程。
压缩对象:100%(73/73),完成。
写入对象:100%(88/88),22.29 KiB | 1.71 MiB/s,完成。
总计88(增量2),重复使用0(增量0)
错误:RPC失败;HTTP 400 curl 22请求的URL返回错误:400错误请求
致命:远程端意外挂起
一切都是最新的

我的程序如下。
1.创建rails应用程序,如下所示。
rails新示例

2.修复路由和应用程序控制器,以显示hello,world。 3.更改文件。
3-1.在开发和测试组中声明sqlite3
gem'sqlite3'

3-2.在生产组中申报pg
gem'pg',0.20.0'

4.执行
捆绑安装--无需生产

5.执行git添加。

6.执行git提交-m“heroku的初始提交”

7.通过
rails s
和访问
localhost:3000

8.执行heroku登录,输入id和密码。
9.execute
heroku-keys:add
,SSH密钥由该操作创建。
10.执行heroku创建
11.execute
git push heroku master
,然后我得到了错误

每个程序的版本如下。
*轨道5.1.6
*heroku/7.14.1 win32-x64 node-v10.9.0

此错误是什么?如何避免此错误?
如果你需要更多的信息,请告诉我


我在下面添加了我的gem文件

source 'https://rubygems.org'

# git_source(:github) do |repo_name|
#  repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
#  "https://github.com/#{repo_name}.git"
# end

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.6'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

gem 'rails_12factor'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Use sqlite3 as the database for Active Record
  gem 'sqlite3'
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
  # Adds support for Capybara system testing and selenium driver
  gem 'capybara', '~> 2.13'
  gem 'selenium-webdriver'
end

group :development do
  # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
  gem 'web-console', '>= 3.3.0'
end

group :production do
  gem 'pg', '0.20.0'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
源代码'https://rubygems.org'
#git_源(:github)do | repo_名称|
#repo_name=“#{repo_name}/#{repo_name}”除非repo_name.include?(“/”)
#  "https://github.com/#{repo_name}.git“
#结束
#捆绑边缘Rails:gem'Rails',github'Rails/Rails'
gem'rails',“~>5.1.6”
#使用Puma作为应用程序服务器
宝石“彪马”,“大于3.7”
#将SCS用于样式表
gem'sass-rails',“~>5.0”
#使用Uglifier作为JavaScript资产的压缩器
gem'uglifier','>=1.3.0'
#看https://github.com/rails/execjs#readme 获取更多受支持的运行时
#宝石“therubyracer”,平台::ruby
gem“rails_12factor”
#将CoffeeScript用于.coffee资产和视图
gem“咖啡轨”,“~>4.2”
#Turbolinks使web应用程序的导航速度更快。阅读更多:https://github.com/turbolinks/turbolinks
gem“涡轮链接”,“大于5”
#轻松构建JSON API。阅读更多:https://github.com/rails/jbuilder
gem'jbuilder',“~>2.5”
#使用Redis适配器在生产中运行操作电缆
#gem'redis',“~>4.0”
#使用ActiveModel具有\u安全\u密码
#gem'bcrypt',“~>3.1.7”
#使用Capistrano进行部署
#gem“capistrano rails”,集团::开发
小组:开发,:测试
#使用sqlite3作为活动记录的数据库
gem'sqlite3'
#在代码中的任意位置调用“byebug”以停止执行并获得调试器控制台
gem'byebug',平台:[:mri,:mingw,:x64_mingw]
#增加了对Capybara系统测试和selenium驱动程序的支持
宝石“水豚”,“大于2.13”
gem“selenium webdriver”
结束
小组:发展怎么办
#在异常页面上或通过使用代码中的任意位置访问IRB控制台。
gem“web控制台”,“>=3.3.0”
结束
小组:生产部
gem‘pg’、‘0.20.0’
结束
#Windows不包括zoneinfo文件,因此捆绑tzinfo数据
gem'tzinfo data',平台:[:mingw,:mswin,:x64_mingw,:jruby]

导航到存储库后,运行以下命令将缓冲区增加到500MB:

git config http.postBuffer 524288000

如果它对任何人都有帮助的话,我在推Azure时也犯了同样的错误。结果证明我已经完成了我的应用服务存储配额。
我删除了一堆大文件,问题就解决了。

在我的例子中,我必须更改远程URL以使用
git:
协议而不是
https:
,而且我还必须创建公钥

要获取当前URL,请执行以下操作:

git远程获取url heroku
假设您的URL类似于
https://git.heroku.com/your-repo-here.git
,您应该使用此命令来使用
git:
协议:

git远程设置url herokugit@heroku.com:your-repo-here.git
创建公钥:

heroku键:添加
参考链接:


这看起来是同一个问题。那个问题的答案有什么好运气吗?谢谢你的评论。我试着根据链接,但我不能。。。我使用的是git版本2.18.0.windows,您认为我应该使用更低版本的git吗?谢谢您的回复。我做了,但我也犯了同样的错误。。。你有什么想法吗?添加这个gem“rails\u 12factor”,然后是$bundle安装,然后是$git添加$git commit-m“add gem”$git push heroku master让我知道这是否有效!我试过了,但结果是一样的。是我的gem文件错了吗。这是我知道的唯一可以给你拒绝许可的原因$git远程设置url herokugit@heroku.com:testapp.git和$heroku keys:add似乎可以解决您的问题谢谢您的帮助。我重新创建了应用程序和ssh密钥,但我无法。。。我的环境可能有问题。