Skip to content

Commit

Permalink
Adding missing signing_key to gemspec
Browse files Browse the repository at this point in the history
per http://developer.zendesk.com/blog/2013/02/03/signing-gems/
    and https://github.com/sferik/twitter/blob/master/twitter.gemspec

1. Create self-signed cert

 cd ~/.ssh
 gem cert --build your@email.com
 chmod 600 gem-p*

2. Configure gem cert (I'm calling mine bf4)

 mkdir certs
 cp ~/.ssh/gem-public_cert.pem certs/bf4.pem
 - commit the pem
 - Add to gemspec
 s.cert_chain  = ['certs/bf4.pem']
 s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/

3. Add your own cert, just like anyone else

 gem cert --add certs/bf4.pem

4. Build gem and test that you can install it

 gem build metric_fu.gemspec
 gem install metric_fu-4.5.1.gem -P HighSecurity
  • Loading branch information
bf4 committed Nov 7, 2013
1 parent 40e69f5 commit ed2f96d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions metric_fu.gemspec
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Gem::Specification.new do |s|


# used with gem i metric_fu -P HighSecurity # used with gem i metric_fu -P HighSecurity
s.cert_chain = ['certs/bf4.pem'] s.cert_chain = ['certs/bf4.pem']
s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/


s.rubyforge_project = 'metric_fu' s.rubyforge_project = 'metric_fu'
s.license = 'MIT' s.license = 'MIT'
Expand Down

0 comments on commit ed2f96d

Please sign in to comment.