Maxence
Maxence

Reputation: 2339

Cannot deploy app to Heroku "Could not read from remote repository"

I am currently learning RUBY and trying to complete a french version of Michael Hartl tutorial.

Though I am blocked at some point of the tutorial. I can't deploy my app to heroku, and get the following :

git push heroku master
Permission denied (publicKey)
fatal: could not read from remote repository

Though:

regarding SSH keys :

I have followed the following for adding publick SSH key to Github : https://help.github.com/articles/generating-ssh-keys

I have aswell completed the following on deploying an heroku app (and adding keys to Heroku): https://devcenter.heroku.com/articles/git

Though I still get this message.

Upvotes: 0

Views: 429

Answers (1)

zeantsoi
zeantsoi

Reputation: 26193

You're likely either deploying with mis-matched SSH keys, or you haven't deployed your keys to Heroku yet. According to the documentation:

A common key error is: Permission denied (publickey). You can fix this by using keys:add to notify Heroku of your new key.

Resolve this error by pushing your keys to Heroku:

# Using the Heroku CLI Toolbelt (https://devcenter.heroku.com/articles/heroku-command)
heroku keys:add

If possible, you'll want to keep a single set of SSH keys on your system so that there's no confusion as to which keys you're deploying with.

Upvotes: 1

Related Questions