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.
$ 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
- Replace LICENSE with the unmodified canonical text for that SPDX license.
- Avoid reflowing or editing the body; only fill placeholders like year and holder.
- Re-run
licensee detectand confirm confidence clears the threshold.
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.
# 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.