Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Gem::GemcutterUtilities#verify_api_key
verify_api_key(key)
lib/rubygems/gemcutter_utilities.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/rubygems/gemcutter_utilities.rb, line 219
def verify_api_key(key)
if Gem.configuration.api_keys.key? key
Gem.configuration.api_keys[key]
elsif stored_key = stored_api_key_named(key)
stored_key
else
alert_error "No such API key. Please add it to your configuration (done automatically on initial `gem push`)."
terminate_interaction(ERROR_CODE)
end
end
Retrieves the pre-configured API key key or terminates interaction with an error.
See also
#update_scope
#wait_for_otp_thread
#stored_api_key_named
#webauthn_enabled?
also in
4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0