rails チュートリアルを進めているのですが、herokuへのデプロイができません。
調べてみたところ、.bundle/configに
[remote "heroku"] url = https://git.heroku.com/sample_app.git fetch = +refs/heads/*:refs/remotes/heroku/*
この記載がなかったため、
fatal: 'heroku' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
というようなエラーが出ているようでした。
そこで修正後に再び、git push heroku masterを実行したところ、別のエラーが出ました。
remote: ! No such app as アプリ名 fatal: repository 'https://git.heroku.com/アプリ名.git/' not found
このエラーコードについてググってみたところ、remoteのURLを変更する方法
が出てきます。
デプロイしたいアプリでgit remote -vでremoteのURLを参照するも、URLは
heroku https://git.heroku.com/アプリ名.git (fetch) heroku https://git.heroku.com/アプリ名.git (push)
のようになっています。
ちなみに、ログイン、commitなどはできています。
以上のことを踏まえて質問は
1.herokuにデプロイしたいアプリのremoteのURLを変更する必要があるのか。
2.そもそも、このエラーに対してremoteのURLを変更することではなく、他に考えられるエラーがあるのかどうか。
これらを教えていただきたいです。初学者故に、的外れな質問かもしれませんが回答お待ちしております。
開発環境はAWSのcloud9です。
あなたの回答
tips
プレビュー