0
0

More than 1 year has passed since last update.

herokuでデプロイできなかった時の対処法

Posted at

Railsで作成中のアプリをデプロイするためherokuを操作していたら、エラーが発生しました。
ターミナル上で git push heroku master を実行。

git@heroku.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists. 

公開キー?に対してエラーが発生しているようです・・・多分。

いろいろ調べていたら、ここに辿り着きました。
https://devcenter.heroku.com/articles/keys

見てみると[キーを増やせばいいよ!]的な事が書かれている・・(元々公開キーは作成済みです)

一旦指示通りに $heroku keys:add  をターミナル上で入力。

その後、もう一度 git push heroku master を実行すると、エラーが解消されました!!

他にもっとスマートな解決方法があるような・・まあOK。

これで解決!!と思い、本番環境で試してみると別のエラーが発生:fearful:

これは別記事で紹介します。では!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0