heroku - rails - Permission denied (publickey)

前端 未结 5 1818
花落未央
花落未央 2021-02-04 06:01
heroku create
Creating floating-planet-1824......................... done, stack is bamboo-mri-1.9.2
http://floating-planet-1824.heroku.com/ | git@heroku.com:floating-pl         


        
相关标签:
5条回答
  • 2021-02-04 06:35

    The problem which i face was setting the ssh environment variable.

    SSH_AUTH_SOCK=0
    
    heroku keys
    

    will show the keys, remove and then login, it will create one for you and add to your app. Or you can create your rsa key with your email and then use it using

    heroku keys:add /path

    Generate key using ssh-keygen -t rsa -C "your_email@youremail.com"

    0 讨论(0)
  • 2021-02-04 06:37

    In case others are facing the same problem: using standalone toolbelt on fedora 16-17 with rmv 1.17.3 and system ruby 1.9.3p392, just clearing heroku keys and credentials was not sufficient, and I tested that the issue was not with my ssh keychain. If anyone has faced similar issues, and is more familiar with the heroku toolbelt, I posted a new issue here.

    0 讨论(0)
  • 2021-02-04 06:39

    It turned out that

    heroku keys:add ~/.ssh/id_rsa.pub
    

    worked.

    0 讨论(0)
  • 2021-02-04 06:39

    Assuming you already have a public and a private key to use in your ~/.ssh folder, there might be two different scenarios:

    • You didn't upload your public key to Heroku's remote server. Solution, execute: heroku keys:add ~/.ssh/your_public_key
    • Or you did, but you don't have your identities loaded into your SSH authentication agent. Solution, execute:

      ssh-add -K ~/.ssh/your_private_key # OSX

      ssh-add -k ~/.ssh/your_private_key # Ubuntu

    and enter your passphrase, so you can use your private key.

    0 讨论(0)
  • 2021-02-04 06:42

    this is how i solved mine

    $ heroku keys:clear
    Removing all SSH keys... done
    $ heroku login
    

    after clearing all previous ssh. heroku login's uploads back my ssh public key and i can happily git push heroku master back

    0 讨论(0)
提交回复
热议问题