Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

Gem::ConfigFile#unset_api_key!

unset_api_key!

Remove the +~/.gem/credentials+ file to clear all the current sessions, and every RubyGems key from the credential store when the credential_store setting is on, including keys saved for other hosts with gem signin --host.