git push heroku master失败,原因是"HTTP 400 curl 22请求的URL返回错误". [英] git push heroku master fails by "HTTP 400 curl 22 The requested URL returned error"
问题描述
我正在尝试显示仅"hello,world."的rails应用程序.
然后我遇到了如下错误.
我想知道如何解决这个问题.
I'm trying to push rails application that shows just "hello, world.".
Then I met an error like below.
I would like to know how to solve this problem.
$ git push heroku master
枚举对象:完成88个.
计数对象:已完成100%(88/88).
最多可使用4个线程进行Delta压缩.
压缩对象:已完成100%(73/73).
书写对象:100%(88/88),22.29 KiB |已完成1.71 MiB/s.
总计88(增量2),可重复使用0(增量0)
错误:RPC失败; HTTP 400 curl 22请求的URL返回错误:400错误的请求
致命:远端意外挂断
一切都是最新的
$git push heroku master
Enumerating objects: 88, done.
Counting objects: 100% (88/88), done.
Delta compression using up to 4 threads.
Compressing objects: 100% (73/73), done.
Writing objects: 100% (88/88), 22.29 KiB | 1.71 MiB/s, done.
Total 88 (delta 2), reused 0 (delta 0)
error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400 Bad Request
fatal: The remote end hung up unexpectedly
Everything up-to-date
我的步骤如下.
1.创建如下所示的Rails应用程序.
rails new sample
2.修复路由和application_controller以显示世界.
3.更改Gemfile.
3-1.在开发和测试小组中声明sqlite3
gem 'sqlite3'
3-2.在生产组中声明pg
gem 'pg', '0.20.0'
4.执行bundle install --without production
5.执行git add .
6.执行git commit -m "initial commit for heroku"
7,确认它是否可以在rails s
上运行并访问localhost:3000
8.执行heroku login
并输入ID和密码.
9.执行heroku keys:add
,并通过此操作创建SSH密钥.
10.执行heroku create
11.执行git push heroku master
然后出现错误
My procedures are below.
1.create rails application like below.
rails new sample
2.fix routes and application_controller to show hello, world.
3.change Gemfile.
3-1.declare sqlite3 in development and test group
gem 'sqlite3'
3-2.declare pg in production group
gem 'pg', '0.20.0'
4.execute bundle install --without production
5.execute git add .
6.execute git commit -m "initial commit for heroku"
7.confirm if it works by rails s
and access to localhost:3000
8.execute heroku login
and enter id and password.
9.execute heroku keys:add
and the SSH key is created by this operation.
10.execute heroku create
11.execute git push heroku master
and then I got the error
每个程序的版本都在下面.
* Rails 5.1.6
* heroku/7.14.1 win32-x64节点-v10.9.0
Each programs' version is below.
* Rails 5.1.6
* heroku/7.14.1 win32-x64 node-v10.9.0
这是什么错误,如何避免此错误?
请告诉我是否需要更多信息.
What is this error and how can I avoid this error?
Please tell me if you need more information.
我在下面添加了我的gem文件.
I added my gem file below.
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]
推荐答案
导航到存储库后,运行以下命令将缓冲区增加到500MB:
Run the following command to increase the buffer to 500MB after navigating to the repository:
git config http.postBuffer 524288000
这篇关于git push heroku master失败,原因是"HTTP 400 curl 22请求的URL返回错误".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!