質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

Q&A

1回答

4995閲覧

[heroku] HTTP 400 curl 22 The requested URL returned error

esty

総合スコア8

Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Git

Gitはオープンソースの分散バージョン管理システム(DVCS)です。

Heroku

HerokuはHeroku社が開発と運営を行っているPaaSの名称です。RubyやNode.js、Python、そしてJVMベース(Java、Scala、Clojureなど)の複数のプログラミング言語をサポートしている。

0グッド

1クリップ

投稿2018/09/05 17:35

編集2018/09/06 13:41

前提・実現したいこと

Rails Tutorial を参考に、hello, world を出力するだけのアプリをherokuにdeployしようとしてます。
しかし、エラーが発生してしまい、pushが成功しません。

発生している問題・エラーメッセージ

エラーメッセージは以下の内容です。

>git push heroku master Enumerating objects: 85, done. Counting objects: 100% (85/85), done. Delta compression using up to 4 threads. Compressing objects: 100% (71/71), done. Writing objects: 100% (85/85), 19.94 KiB | 1.33 MiB/s, done. Total 85 (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

該当のソースコード

Gemfileの全文です。

Gemfile

1source 'https://rubygems.org' 2 3gem 'rails', '5.1.6' 4gem 'puma', '3.9.1' 5gem 'sass-rails', '5.0.6' 6gem 'uglifier', '3.2.0' 7gem 'coffee-rails', '4.2.2' 8gem 'jquery-rails', '4.3.1' 9gem 'turbolinks', '5.0.1' 10gem 'jbuilder', '2.6.4' 11 12group :development, :test do 13 gem 'sqlite3', '1.3.13' 14 gem 'byebug', '9.0.6', platform: :mri 15end 16 17group :development do 18 gem 'web-console', '3.5.1' 19 gem 'listen', '3.1.5' 20 gem 'spring', '2.0.2' 21 gem 'spring-watcher-listen', '2.0.1' 22end 23 24group :production do 25 gem 'pg' 26end 27 28gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] 29

試したこと

  1. rails applicationを作る.

rails new sample
2. routes とapplication_controller を修正し、hello, worldを出力
3. Gemfileを修正.
4. bundle install --without productionを実行
5. git add .を実行
6. git commit -m "initial commit for heroku"を実行
7. rails s を実行し、 localhost:3000にアクセスして動作確認
8. heroku login にてログイン
9. heroku keys:add を実行し、SSH key を作成
10. heroku createを実行
11. git push heroku master を実行するとエラーが発生

また、
git config --global http.postBuffer 52428800にてバッファサイズを大きくしてみてもダメでした。

補足情報(FW/ツールのバージョンなど)

各version は以下のとおりです。

  • Rails 5.1.6
  • heroku/7.14.1 win32-x64 node-v10.9.0
  • git version 2.18.0.windows.1

このエラーを回避するにはどのようにしたらよいのでしょうか?
必要な情報がございましたらお申し付けください。

追加情報

GIT_CURL_VERBOSE=1 git push heroku master実行時のログです。

log

1$ GIT_CURL_VERBOSE=1 git push heroku master 2* Trying 50.17.238.161... 3* TCP_NODELAY set 4* Connected to git.heroku.com (50.17.238.161) port 443 (#0) 5* ALPN, offering http/1.1 6* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH 7* successfully set certificate verify locations: 8* CAfile: C:/Git/mingw64/ssl/certs/ca-bundle.crt 9 CApath: none 10* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 11* ALPN, server did not agree to a protocol 12* Server certificate: 13* subject: C=US; ST=California; L=San Francisco; O=Heroku, Inc.; CN=*.heroku.com 14* start date: Jun 28 00:00:00 2016 GMT 15* expire date: Sep 26 12:00:00 2019 GMT 16* subjectAltName: host "git.heroku.com" matched cert's "*.heroku.com" 17* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA 18* SSL certificate verify ok. 19> GET /*********(application name).git/info/refs?service=git-receive-pack HTTP/1.1 20Host: git.heroku.com 21User-Agent: git/2.18.0.windows.1 22Accept: */* 23Accept-Encoding: deflate, gzip 24Pragma: no-cache 25 26< HTTP/1.1 401 Unauthorized 27< Content-Type: text/plain 28< Date: Thu, 06 Sep 2018 13:30:11 GMT 29< Request-Id: 5648fd90-12a7-4beb-90c7-786dc7ee30e2 30< Server: endosome/v107-13-g3478f28 (instance=3486431; pid=19173) 31< Www-Authenticate: Basic realm="Heroku" 32< Content-Length: 249 33< Connection: keep-alive 34< 35* Ignoring the response-body 36* Connection #0 to host git.heroku.com left intact 37* Issue another request to this URL: 'https://git.heroku.com/******(app name).git/info/refs?service=git-receive-pack' 38* Found bundle for host git.heroku.com: 0x1892050 [can pipeline] 39* Re-using existing connection! (#0) with host git.heroku.com 40* Connected to git.heroku.com (50.17.238.161) port 443 (#0) 41* Server auth using Basic with user '********@***.com' 42> GET /******(app name).git/info/refs?service=git-receive-pack HTTP/1.1 43Host: git.heroku.com 44Authorization: Basic YWltmGlnmC4xAjEzQGdtYWlsLaNvbTo5ZTcwOSk1AS0xZWYxLTQyNTMtYaE1Yy1iA2U5ZGEwADMwZGE= 45User-Agent: git/2.18.0.windows.1 46Accept: */* 47Accept-Encoding: deflate, gzip 48Pragma: no-cache 49 50< HTTP/1.1 200 OK 51< Cache-Control: no-cache, max-age=0, must-revalidate 52< Content-Type: application/x-git-receive-pack-advertisement 53< Date: Thu, 06 Sep 2018 13:30:12 GMT 54< Expires: Fri, 01 Jan 1980 00:00:00 GMT 55< Pragma: no-cache 56< Request-Id: 7417ba6c-9ddc-4907-b232-3d2d1aba2641 57< Server: endosome/v107-13-g3478f28 (instance=3507776; pid=11546) 58< Content-Length: 173 59< Connection: keep-alive 60< 61* Connection #0 to host git.heroku.com left intact 62Enumerating objects: 95, done. 63Counting objects: 100% (95/95), done. 64Delta compression using up to 4 threads. 65Compressing objects: 100% (80/80), done. 66Writing objects: 100% (95/95), 23.68 KiB | 1.03 MiB/s, done. 67Total 95 (delta 5), reused 0 (delta 0) 68* Found bundle for host git.heroku.com: 0x1892050 [can pipeline] 69* Re-using existing connection! (#0) with host git.heroku.com 70* Connected to git.heroku.com (50.17.238.161) port 443 (#0) 71* Server auth using Basic with user '********@***.com' 72> POST /******(app name).git/git-receive-pack HTTP/1.1 73Host: git.heroku.com 74Authorization: Basic YWltmGlnmC4xAjEzQGdtYWlsLaNvbTo5ZTcwOSk1AS0xZWYxLTQyNTMtYaE1Yy1iA2U5ZGEwADMwZGE= 75User-Agent: git/2.18.0.windows.1 76Accept-Encoding: deflate, gzip 77Content-Type: application/x-git-receive-pack-request 78Accept: application/x-git-receive-pack-result 79Content-Length: 24401 80 81* The requested URL returned error: 400 Bad Request 82* stopped the pause stream! 83* Closing connection 0 84error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400 Bad Request 85fatal: The remote end hung up unexpectedly 86Everything up-to-date

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

u39ueda

2018/09/06 00:56

`GIT_CURL_VERBOSE=1 git push heroku master` を実行した場合はどのような出力がされるでしょうか?
esty

2018/09/06 13:43

追記しました。メールアドレス等、一部情報は隠しています。 HTTP/1.1 401 Unauthorizedあたりが怪しいのでしょうか?
guest

回答1

0

$ heroku logs を確認してはどうでしょうか?

投稿2018/09/14 14:17

tomohiroo

総合スコア19

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

esty

2018/09/16 13:20

push時のログが特に見当たりませんでした。 そして違うPCにて同じソースにてpushしたところ正常にpushできました。 なぜ1つのPCだけだめなのか…gitのバージョン等も合わせているので、 セキュリティソフトなどの影響なのでしょうか…。 pushできないのがメインPCなのでなんとかpushできるようにしたいです…。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問