instance method
Gem::Commands::CertCommand#load_default_key
load_default_key
lib/rubygems/commands/cert_command.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/rubygems/commands/cert_command.rb, line 261
def load_default_key
key_file = File.join Gem.default_key_path
key = File.read key_file
passphrase = ENV["GEM_PRIVATE_KEY_PASSPHRASE"]
options[:key] = OpenSSL::PKey.read key, passphrase
rescue Errno::ENOENT
alert_error \
"--private-key not specified and ~/.gem/gem-private_key.pem does not exist"
terminate_interaction 1
rescue OpenSSL::PKey::PKeyError
alert_error \
"--private-key not specified and ~/.gem/gem-private_key.pem is not valid"
terminate_interaction 1
end
No documentation available
See also
#load_default_cert
#open_cert
#execute
#open_private_key
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0