End of Life Ruby 3.1 has reached end of life and gets no more fixes. 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.1.3/lib/rubygems/config_file.rb, line 339
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.