开发者

Heroku keys:add using a different path for my keys

My SSH keys are associated with my root directory and have none associated with each user. When I try to add my keys to heroku i get this response:

skline-mac:~ skline$ heroku keys:add
No ssh public key found in /Users/skline/.ssh/id_[rd]sa.pub.  You may want to specify the full path to the keyfile.

This makes sense because my ssh keys are actually located at /var/root/.ssh/id_rsa.pub. How can I tell heroku to look for my ssh keys there?

Note, because I have locked my ssh directory on my current user using: $ chmod 700 ~/.ssh and $ chmod 600 ~/.ssh/*. I no longer know how to access these directories. Sorry I am new to OSX

Also, when I try to do the same command using sudo, I get:

skline-mac:~ skline$ sudo heroku keys:add 
/Users/skline/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:861:in `report_activate_error': Could not find RubyGem heroku (>= 0) (Gem::LoadError)
    from /Users/skline/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:255:in `activate'
    from /Users/skline/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:1204:in `gem'
    from /Users/skline/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/bin/heroku:18:in `<main>'

Note I also get this errory when I try heroku keys:ad开发者_如何学Pythond /var/root/.ssh/id_rsa.pub I get this error:

skline-mac:~ skline$ heroku keys:add /var/root/.ssh/id_rsa.pub
/Users/skline/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:861:in `report_activate_error': Could not find RubyGem heroku (>= 0) (Gem::LoadError)
    from /Users/skline/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:255:in `activate'
    from /Users/skline/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:1204:in `gem'
    from /Users/skline/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/bin/heroku:18:in `<main>'


To answer your question most simply:

heroku keys:add /var/root/.ssh/id_rsa.pub

Regarding "locking" your /~/.ssh folder, those permissions still give you (their owner) full access to read and write files to them.

And when you run sudo heroku keys:add it throws a fit because of something related to RVM + not the user the gem is installed under, and thus when it tries to load a gem it's not finding it. At least, that's my quick assessment from the output you shared. See comment below for correction.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜