End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Gem::GemcutterUtilities#api_key
api_key
lib/rubygems/gemcutter_utilities.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/rubygems/gemcutter_utilities.rb, line 43
def api_key
if ENV["GEM_HOST_API_KEY"]
ENV["GEM_HOST_API_KEY"]
elsif options[:key]
verify_api_key options[:key]
elsif Gem.configuration.api_keys.key?(host)
Gem.configuration.api_keys[host]
else
Gem.configuration.rubygems_api_key
end
end
The API key from the command options or from the user’s configuration.
See also
#add_otp_option
#api_key_forbidden?
#add_key_option
#ask_otp
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1