{"record":{"id":"80eaee75308b59c7","repo":"ruby/rubygems","slug":"passphrase-and-passphrase-confirmation-don-t-match","errorCode":null,"errorMessage":"Passphrase and passphrase confirmation don't match","messagePattern":"Passphrase and passphrase confirmation don't match","errorType":"exception","errorClass":"Gem::CommandLineError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/commands/cert_command.rb","lineNumber":174,"sourceCode":"    cert = Gem::Security.create_cert_email(\n      email,\n      key,\n      Gem::Security::ONE_DAY * expiration_length_days\n    )\n\n    Gem::Security.write_certificate cert, \"gem-public_cert.pem\"\n  end\n\n  def build_key # :nodoc:\n    return options[:key] if options[:key]\n\n    passphrase = ask_for_password \"Passphrase for your Private Key:\"\n    say \"\\n\"\n\n    passphrase_confirmation = ask_for_password \"Please repeat the passphrase for your Private Key:\"\n    say \"\\n\"\n\n    raise Gem::CommandLineError,\n          \"Passphrase and passphrase confirmation don't match\" unless passphrase == passphrase_confirmation\n\n    algorithm = options[:key_algorithm] || Gem::Security::DEFAULT_KEY_ALGORITHM\n    key = Gem::Security.create_key(algorithm)\n    key_path = Gem::Security.write_private_key key, \"gem-private_key.pem\", 0o600, passphrase\n\n    [key, key_path]\n  end\n\n  def certificates_matching(filter)\n    return enum_for __method__, filter unless block_given?\n\n    Gem::Security.trusted_certificates.select do |certificate, _|\n      subject = certificate.subject.to_s\n      subject.downcase.index filter\n    end.sort_by do |certificate, _|\n      certificate.subject.to_a.map {|name, data,| [name, data] }\n    end.each do |certificate, path|","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/rubygems/commands/cert_command.rb#L156-L192","documentation":"Error \"Passphrase and passphrase confirmation don't match\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/rubygems/commands/cert_command.rb:174 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}