sebkkom
sebkkom

Reputation: 1446

git push heroku master fails because key is not authorized

I registered on Heroku a couple of minutes ago and tried to deploy my first Rails application. Everything was working fine until I made the mistake of changing the name of the app from the web interface.

That was it, now both

heroku rename

and

git push heroku master

fail because "Your key with fingerprint blahblah is not authorized to access application".

I tried deleting my key from heroku and logging out and then in again (from the command line) but nothing works. I am not that experienced with git either so I thought my keys there are probably messed up but I can add, commit and push to git just fine.

Any ideas?

Upvotes: 3

Views: 2625

Answers (2)

Mark
Mark

Reputation: 7625

Try something like this:

git remote rm heroku
git remote add heroku NEW_GIT_REPO_URL

Upvotes: 7

BGuimberteau
BGuimberteau

Reputation: 249

You need to change the name of git for heroku.

For this when you are in your application do this

cd .git
vim config

And now you have

[remote "heroku"]
    url = [email protected]:old_name.git

Change by :

[remote "heroku"]
    url = [email protected]:new_name.git

Good luck

Upvotes: 4

Related Questions