Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

deploying rails to heroku - unauthorized public key access

So I'm trying to deploy my app to heroku but it keeps giving me this error whenever I push to master:

! Your key with fingerprint cb:e1:5c:31:cd:6b:78:6e:30:ff:eb:11:e2:4b:2e:b3 is not authorized to access smooth-mountain-8970.

I tried everything from generating new ssh keys to deleting everything and replacing the files. I even created a different username and tried uploading, but it keep giving me this error thinking that I want to upload to smooth-mountain when in fact, my app name is NOT smooth-mountain. Do you guys know what the problem might be?

Thanks.

like image 696
Nosayr Yassin Avatar asked Jan 18 '12 21:01

Nosayr Yassin


1 Answers

ssh-agent (a program that holds private keys used for public key authentication) runs automatically since Mac OS X Leopard. To resolve your problem you must remove identities from the agent by issuing the following command.

ssh-add -d

Example:

> ssh-add -l 
1024 a3:d5:21:2d:50:ee:3e:af:1b:44:62:60:1d:e4:51:21 /Users/bart/.ssh/id_dsa (DSA)

> ssh-add -d 
Identity removed: /Users/bart/.ssh/id_dsa (/Users/bart/.ssh/id_dsa.pub)

> ssh-add -l 
The agent has no identities.

This will only remove the keys from this session temporarily. Personally, I don't mind doing this once in a while. However, if you would like disable ssh-agent permanently, see: SSH Key Disable Caching

like image 65
user664833 Avatar answered Sep 21 '22 13:09

user664833