Reputation: 997
I've been using Heroku normally in the past few months. In the beginning, I created a ssh key, I added it to my Heroku account and I could deploy my apps without any problem. Until today. I'm working on a new project and I needed to create a new Heroku account under a different e-mail address. After a while I realized I couldn't deploy this app using a new e-mail address because my SSH key was associated to a different e-mail. Then I created a new SSH key and added it to my new Heroku account. It didn't work! :)
Well, I removed the key from my computer and from my new Heroku account. Then I decided to go back to my original Heroku account. Everything works, well, more or less. I can still deploy my old apps, I can see I only have one SSH key there, I can run the commands: heroku info
, heroku apps
, etc.
So then I tried to deploy my new app, but before I created a new Heroku app using: heroku create
. The new app was created successfully. But when I try: git push heroku
I get this error:
! Your key with fingerprint b2:69:3b:90:1e:e1:60:ad:a0:b9:f7:::*:* is not authorized to access furious-leaf-9996.
If I try: heroku info
, I get this error:
! You do not have access to furious-leaf-9996.
The funny thing is, if I switch to the other app's directory and try to do the same thing (ex.: heroku info
, git push heroku
), everything works perfectly.
Note 1: When I try heroku logout
then heroku login
, I'm always able to connect, in both app's directory
Note 2: I'm using RVM and both apps use different gemsets.
I don't know what else to do!! Anyone??
Thanks!
Upvotes: 1
Views: 2828
Reputation: 997
After getting almost crazy I found out what was happening.
When I first tried to login on my second Heroku account, my .git config file was updated with this info:
[remote "heroku"]
url = [email protected]:furious-leaf-9996.git
fetch = +refs/heads/*:refs/remotes/heroku/*
And this was the problem. Even logging out and logging in again in different Heroku accounts, every time I tried to push my files there, I couldn't because I didn't have access to this repository. And it got worse because I deleted this repository. :)
Now everything is working properly.
So next time you have access problems on Heroku, take a look at your git config file!
Thanks!
Upvotes: 6