Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Gem::ConfigFile#unset_api_key!
unset_api_key!
lib/rubygems/config_file.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/rubygems/config_file.rb, line 359
def unset_api_key!
return false unless File.exist?(credentials_path)
File.delete(credentials_path)
end
Remove the +~/.gem/credentials+ file to clear all the current sessions.