Skip to content
Latchkey

licensee reports "License: Unknown" for the project in CI

licensee could not match the repository LICENSE file to a known license above its confidence threshold, so it reports "License: Unknown". This is what GitHub uses to detect a repo license, and a CI gate that expects a specific SPDX license then fails.

What this error means

Running licensee detect shows "License: Unknown" or "None" with a confidence below the threshold, even though a LICENSE file exists. A step that asserts an expected license fails.

Terminal
$ licensee detect
License:        Unknown
Matched files:  LICENSE
  LICENSE:
    Confidence:   82.14%
    (below the 90% threshold)

Common causes

The LICENSE text was modified

Edited or reformatted license text drops the match confidence below licensee's threshold, so it cannot map the file to a known SPDX license.

A non-standard or custom license

A custom or dual license that licensee does not recognize is reported as Unknown because there is no template to match.

How to fix it

Restore a verbatim license text

  1. Replace LICENSE with the unmodified canonical text for that SPDX license.
  2. Avoid reflowing or editing the body; only fill placeholders like year and holder.
  3. Re-run licensee detect and confirm confidence clears the threshold.
Terminal
licensee detect .

Add an SPDX identifier to package metadata

Where the project manifest supports it, declare the SPDX license so downstream tools have an authoritative value even if the file is custom.

project.gemspec
# gemspec / package manifest
spec.license = "MIT"

How to prevent it

  • Ship canonical, unedited license text so detection stays confident.
  • Declare the SPDX license in the manifest as a second source of truth.
  • Fill only placeholders (year, holder) rather than editing license wording.

Frequently asked questions

What causes "licensee "License: Unknown""?
Edited or reformatted license text drops the match confidence below licensee's threshold, so it cannot map the file to a known SPDX license.
How do I fix licensee "License: Unknown"?
Restore a verbatim license text

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card