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

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

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

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

Heroku

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

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

Q&A

解決済

1回答

545閲覧

git push heroku main を実行するとエラーがでてしまいます。

Akira_0809

総合スコア14

Git

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

Heroku

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

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

0グッド

0クリップ

投稿2022/05/23 04:21

初めて使うので情報が足りないかもしれません。

git push heroku main

実行すると下のエラーがでてしまいます。

error: src refspec main does not match any error: failed to push some refs to 'https://git.heroku.com/twidouga.git'

2つのエラーの意味と対処法を教えてください。
お願いします。

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

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

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

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

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

hoshi-takanori

2022/05/23 04:37

ローカルに main ブランチありますか? master だったりするのでは…。
Akira_0809

2022/05/23 11:57

masterを入力しても同じエラーが出ました。 git branchを入力しても何も出てきませんでした。
hoshi-takanori

2022/05/23 12:03

それはまだ何もコミットしてないのでは…。
Akira_0809

2022/05/23 23:35

git commit -m "My first commit"これを実行しています。これでコミットできてますか?
hoshi-takanori

2022/05/24 00:07

たぶんできてないと思います。(できてたら git log でコミットの履歴が出るはず。) git commit の前に、git add でコミットしたいファイルをインデックスに追加する必要があります。 https://26gram.com/git-commit
Akira_0809

2022/05/24 03:05

git add . をした後に git commit -m "My first commit"を実行しました。 Author identity unknown *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: unable to auto-detect email address (got 'akira_nzdqq9k@DESKTOP-Q22V5OK.(none)') 上の様なものが表示されました。これでコミットできていますか?
Akira_0809

2022/05/24 03:40

コミット出来たのでgit push heroku main を実行しました。 Enumerating objects: 6, done. Counting objects: 100% (6/6), done. Delta compression using up to 8 threads Compressing objects: 100% (4/4), done. Writing objects: 100% (6/6), 791 bytes | 395.00 KiB/s, done. Total 6 (delta 0), reused 0 (delta 0), pack-reused 0 remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-20 stack remote: -----> Determining which buildpack to use for this app remote: -----> Python app detected remote: -----> Using Python version specified in runtime.txt remote: -----> Installing python-3.10.4 remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1 remote: -----> Installing SQLite3 remote: -----> Installing requirements with pip remote: Collecting requests remote: Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB) remote: ERROR: Could not find a version that satisfies the requirement time (from versions: none) remote: ERROR: No matching distribution found for time remote: ! Push rejected, failed to compile Python app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to twidouga. remote: To https://git.heroku.com/twidouga.git ! [remote rejected] main -> main (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/twidouga.git' この3つのエラーが出てしまいました。 ERROR: Could not find a version that satisfies the requirement time (from versions: none) ERROR: No matching distribution found for time error: failed to push some refs to 'https://git.heroku.com/twidouga.git' timeのバージョンを指定しなければいけないのでしょうか?
Akira_0809

2022/05/24 06:00

time のエラーはrequirement.txtにtimeを記載していたのが原因でした。 もう一度実行すると Enumerating objects: 15, done. Counting objects: 100% (15/15), done. Delta compression using up to 8 threads Compressing objects: 100% (13/13), done. Writing objects: 100% (15/15), 1.51 KiB | 1.51 MiB/s, done. Total 15 (delta 5), reused 0 (delta 0), pack-reused 0 remote: Compressing source files... done. remote: Building source: remote: remote: -----> Building on the Heroku-20 stack remote: -----> Determining which buildpack to use for this app remote: -----> Python app detected remote: -----> Using Python version specified in runtime.txt remote: -----> Installing python-3.10.4 remote: -----> Installing pip 22.0.4, setuptools 60.10.0 and wheel 0.37.1 remote: -----> Installing SQLite3 remote: -----> Installing requirements with pip remote: Collecting requests remote: Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB) remote: Collecting schedule remote: Downloading schedule-1.1.0-py2.py3-none-any.whl (10 kB) remote: Collecting BeautifulSoup remote: Downloading BeautifulSoup-3.2.2.tar.gz (32 kB) remote: Preparing metadata (setup.py): started remote: Preparing metadata (setup.py): finished with status 'error' remote: error: subprocess-exited-with-error remote: remote: × python setup.py egg_info did not run successfully. remote: │ exit code: 1 remote: ╰─> [7 lines of output] remote: Traceback (most recent call last): remote: File "<string>", line 2, in <module> remote: File "<pip-setuptools-caller>", line 34, in <module> remote: File "/tmp/pip-install-x8rt8xq3/beautifulsoup_8205274700dc499a9c0a1a0f75be0e8b/setup.py", line 3 remote: "You're trying to run a very old release of Beautiful Soup under Python 3. This will not work."<>"Please use Beautiful Soup 4, available through the pip package 'beautifulsoup4'." remote: ^^ remote: SyntaxError: invalid syntax remote: [end of output] remote: remote: note: This error originates from a subprocess, and is likely not a problem with pip. remote: error: metadata-generation-failed remote: remote: × Encountered error while generating package metadata. remote: ╰─> See above for output. remote: remote: note: This is an issue with the package mentioned above, not pip. remote: hint: See above for details. remote: ! Push rejected, failed to compile Python app. remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to twidouga. remote: To https://git.heroku.com/twidouga.git ! [remote rejected] main -> main (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/twidouga.git' 2つのエラーが出ていました。 error: subprocess-exited-with-error error: metadata-generation-failed この2つのエラーはどの様な意味なのでしょうか?
hoshi-takanori

2022/05/24 06:16

Beautiful Soup が古いと言ってますね。というか、これは何をするプログラムですか?
Akira_0809

2022/05/24 06:41

これはウェブサイトから動画を取ってきてLINEに貼るプログラムです。 あとherokuにデプロイできました。 ご丁寧にありがとうございました。 とても分かりやすかったです。
guest

回答1

0

自己解決

gitにメールアドレスとユーザ名を登録していませんでした。

投稿2022/05/24 12:24

Akira_0809

総合スコア14

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問