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

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

新規登録して質問してみよう
ただいま回答率
85.46%
Git

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

Heroku

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

Windows

Windowsは、マイクロソフト社が開発したオペレーティングシステムです。当初は、MS-DOSに変わるOSとして開発されました。 GUIを採用し、主にインテル系のCPUを搭載したコンピューターで動作します。Windows系OSのシェアは、90%を超えるといわれています。 パソコン用以外に、POSシステムやスマートフォンなどの携帯端末用、サーバ用のOSもあります。

Q&A

1回答

2084閲覧

git push heroku masterができません

nose

総合スコア6

Git

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

Heroku

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

Windows

Windowsは、マイクロソフト社が開発したオペレーティングシステムです。当初は、MS-DOSに変わるOSとして開発されました。 GUIを採用し、主にインテル系のCPUを搭載したコンピューターで動作します。Windows系OSのシェアは、90%を超えるといわれています。 パソコン用以外に、POSシステムやスマートフォンなどの携帯端末用、サーバ用のOSもあります。

0グッド

0クリップ

投稿2020/09/16 11:08

編集2020/09/16 14:12

前提・実現したいこと

eclipsで作成したプロジェクトをherokuの手順にしたがって進めていたのですが、pushの過程に入るとエラーが出てしまいます。アドバイスいただけたら幸いです。よろしくお願いいたします。

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

$ git push heroku master Enumerating objects: 243, done. Counting objects: 100% (243/243), done. Delta compression using up to 4 threads Compressing objects: 100% (241/241), done. Writing objects: 100% (243/243), 54.89 MiB | 526.00 KiB/s, done. Total 243 (delta 56), reused 0 (delta 0), pack-reused 0 remote: Compressing source files... done. remote: Building source: remote: remote: ! No default language could be detected for this app. remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically. remote: See https://devcenter.heroku.com/articles/buildpacks remote: remote: ! Push failed remote: ! remote: ! ## Warning - The same version of this code has already been built: 079df62c0b83ab8fdf879e5b902b03946b20e409 remote: ! remote: ! We have detected that you have triggered a build from source code with version 079df62c0b83ab8fdf879e5b902b03946b20e409 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 secure-escarpment-48703. remote: To https://git.heroku.com/secure-escarpment-48703.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/secure-escarpment-48703.git'
Enumerating objects: 243, done. Counting objects: 100% (243/243), done. Delta compression using up to 4 threads Compressing objects: 100% (241/241), done. Writing objects: 100% (243/243), 54.89 MiB | 468.00 KiB/s, done. Total 243 (delta 56), reused 0 (delta 0), pack-reused 0 remote: Compressing source files... done. remote: Building source: remote: remote: -----> App not compatible with buildpack: https://github.com/heroku/heroku-buildpack-java.git remote: Could not find a pom.xml file! Please check that it exists and is committed to Git. remote: 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: 079df62c0b83ab8fdf879e5b902b03946b20e409 remote: ! remote: ! We have detected that you have triggered a build from source code with version 079df62c0b83ab8fdf879e5b902b03946b20e409 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 secure-escarpment-48703. remote: To https://git.heroku.com/secure-escarpment-48703.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/secure-escarpment-48703.git'

該当のソースコード

$ heroku login $ cd Desktop $ git init $ heroku git:remote -a アプリ名 $ git add . $ git commit -m "first commit" $ git push heroku master $ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-java.git Buildpack set. Next release on secure-escarpment-48703 will use https://github.com/heroku/heroku-buildpack-java.git. Run git push heroku main to create a new release using this buildpack.

試したこと

ネットでエラー対応を調べ、git pullなどいろいろ試しましたがうまくいきませんでした

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

windows10
eclips
maven3.6.3

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

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

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

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

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

guest

回答1

0

該当するソースコードに書かれたコマンドしかやってないということで良かったでしょうか?
だとしたら作業工程が足りません。gitのURLを設定したらその後アプリをコミットしないとpushしても意味がないので、以下のコマンドを実行してください。

$ git add . $ git commit -m "first commit" $ git push heroku master

投稿2020/09/16 12:33

Supernove

総合スコア1154

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

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

nose

2020/09/16 12:40

アドバイスありがとうございます。私の確認不足で実行したコマンドの内容が不足しておりました。大変申し訳ございません。このコマンドも実行した後のエラーです。お忙しいところ恐縮ですが、ご教授いただけると幸いです。何卒宜しくお願い致します。
Supernove

2020/09/16 12:51

了解です。だとしたらgitのエラーと言うよりデプロイ時のエラーのようです。そしてエラーメッセージをよく見たら【No default language could be detected for this app.】とあるのでデプロイするアプリに合わせたビルドパックを設定する必要があるかもしれません。取り上げている言語は違うと思いますが、以下の記事を参考にしてみてはいかがでしょうか? https://qiita.com/arekore0/items/eae550bdbcc78eeac082
nose

2020/09/16 14:14

コメントありがとうございます。アプリに合わせた言語設定は盲点でした。早速実行しpushしたのですが、ほぼ同じエラーが出てしまいました、、 参考urlも添付していただいたのに大変申し訳ございません。もう少し模索してみます、、、
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

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

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

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

ただいまの回答率
85.46%

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

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

質問する

関連した質問