ruby/rubygems · error · Gem::Security::Exception

no certs provided

Error message

no certs provided

What it means

Error "no certs provided" thrown in ruby/rubygems.

Source

Thrown at lib/rubygems/security/signer.rb:143

  def load_cert_chain # :nodoc:
    return if @cert_chain.empty?

    while @cert_chain.first.issuer.to_s != @cert_chain.first.subject.to_s do
      issuer = Gem::Security.trust_dir.issuer_of @cert_chain.first

      break unless issuer # cert chain is verified later

      @cert_chain.unshift issuer
    end
  end

  ##
  # Sign data with given digest algorithm

  def sign(data)
    return unless @key

    raise Gem::Security::Exception, "no certs provided" if @cert_chain.empty?

    if @cert_chain.length == 1 && @cert_chain.last.not_after < Time.now
      alert("Your certificate has expired, trying to re-sign it...")

      re_sign_key(
        expiration_length: (Gem::Security::ONE_DAY * options[:expiration_length_days])
      )
    end

    full_name = extract_name @cert_chain.last

    Gem::Security::SigningPolicy.verify @cert_chain, @key, {}, {}, full_name

    @key.sign @digest_algorithm.new, data
  end

  ##
  # Attempts to re-sign the private key if the signing certificate is expired.

View on GitHub (pinned to 86cbb817a3)

Solutions

  1. Pass a certificate (and chain) to Gem::Security::Signer, e.g. via `gem cert --build` and signing config

When it happens

Trigger: Thrown at lib/rubygems/security/signer.rb:143 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruby/rubygems@86cbb817a3 (2026-08-23). Data as JSON: /api/errors/e63c209202a64db6. Report an issue: GitHub.