git push heroku masterI get this:
Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.To solve this problem, I read how to manage your keys. I can't say I have the right answer, but this works for me.
- Make sure you have only one public key on Heroku (I'm not saying 2+ won't work. I'm saying it didn't work for me.) I'm doing this all in the command line.
- Type "heroku keys" to see what keys Heroku has for your profile
- Type "heroku keys:remove key_name" to remove the key you don't want
- Make sure the key you have is the same key on github
- To add the key "heroku add ~/.ssh/key_name.pub"
Note: You may need to login to heroku to do this. In order to log in, type "heroku login" then type your credentials.
If all that doesn't work, try to create a config file in your ssh folder. Your config file should look like this:
Host heroku.com Hostname heroku.com Port 22 IdentitiesOnly yes IdentityFile ~/.ssh/your_key_name TCPKeepAlive yes User your_emailResource:
0 comments:
Post a Comment