Shields: "unknown license" for github license badge

Created on 29 Jul 2016  路  16Comments  路  Source: badges/shields

Why doesn't Shields recognize my project's badge?

https://github.com/Jire/KTON

license

[![license](https://img.shields.io/github/license/Jire/KTON.svg)](https://github.com/Jire/KTON/blob/master/LICENSE.txt)
bug service-badge

Most helpful comment

Doesn't work on my new project either. I wonder if it's because the "unknown license" image was cached before I added a LICENSE file?

All 16 comments

recognizes glpv2 on ours, very odd.

tried renaming your license file? LICENSE-APACHE-2.0 or something?

Doesn't work on my new project either. I wonder if it's because the "unknown license" image was cached before I added a LICENSE file?

Same problem here: License

[![License](https://img.shields.io/github/license/Lambda3/dotnet-commands.svg)](https://github.com/Lambda3/dotnet-commands/blob/master/LICENSE.txt)

It wont solve anything, but havent you guys ever heard of relative linking?
License
[![License](https://img.shields.io/github/license/Lambda3/dotnet-commands.svg)](./LICENSE.txt)

in any event you guys can workaround this issue easily until this issue is resolved

License
[![License](https://img.shields.io/badge/Licence-Apache%202.0-blue.svg)](./LICENSE.txt)

We are running into this issue as well:

[![license](https://img.shields.io/github/license/plus3it/watchmaker.svg)](./LICENSE)

Interestingly, enough, it seems to work fine with:

[![license](https://img.shields.io/github/license/plus3it/systemprep.svg)](./LICENSE)

But both projects have the same LICENSE file. I haven't been able to pinpoint the exact problem with the plus3it/watchmaker project.
I downloaded and installed benbalter/licensee (which I believe is what github/license uses) and got back the following:

C:\Users\Vekyllis\GitHubRepos>licensee watchmaker
License file: LICENSE
Attribution: Copyright 2015 Maintainers of plus3it/watchmaker
License: Apache License 2.0
Confidence: 99.89%
Method: Licensee::Matchers::Dice

So licensee seems to be outputting correctly which leads me to believe that the call to https://img.shields.io/github/license/ is producing the incorrect response somehow.

Also, while I added the above information in support of the issue. I think Shields itself is not the problem since it just creates the badge in response to an API call. I think the underlying issue may be with GitHub's call itself so I sent a support ticket to GitHub to see if they could look into it.

so I sent a support ticket to GitHub to see if they could look into it.

bah, good luck, you have a better chance of winning the lottery, 9/1 they will palm it off to some side project they use. Not before they say they will pass it along to dev team for feedback...or some same such nonsense.

PHP License is see as "Other":
license
[![license](https://img.shields.io/github/license/alphp/win32service.svg)](https://github.com/alphp/win32service/blob/master/LICENSE)

Shields.io currently uses Github REST API (license fragment from /repos/:owner/:repo resource) to get license name.
@Jire GitHub API returns null as a license for https://github.com/Jire/KTON

curl "https://api.github.com/repos/Jire/KTON" -H "Accept: application/vnd.github.drax-preview+json" -s | jq '.license' 
null

I renamed license file to LICENSE in my fork and it returns rigth license name:

curl "https://api.github.com/repos/platan/KTON" -H "Accept: application/vnd.github.drax-preview+json" -s | jq '.license' 
{
  "key": "apache-2.0",
  "name": "Apache License 2.0",
  "spdx_id": "Apache-2.0",
  "url": "https://api.github.com/licenses/apache-2.0",
  "featured": true
}

License badge (see https://github.com/platan/KTON) works as well.

@giggio It seems that it works properly for your repo now.

@KevinPlus3 I see that license badge works properly for your repos.

@alphp GitHub recognizes your license as:
curl "https://api.github.com/repos/alphp/win32service" -H "Accept: application/vnd.github.drax-preview+json" -s | jq '.license.name'
"Other"
I can see you added custom badge.

Seems like this can be closed, then?

I think so.

Issue clarified, GitHub does not have the PHP license between the list of "recognized" licenses and tag the project's license as "Other".

@paulmelnikow We can close this issue now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

techtonik picture techtonik  路  3Comments

bruno-garcia picture bruno-garcia  路  3Comments

AlexWayfer picture AlexWayfer  路  3Comments

calebcartwright picture calebcartwright  路  3Comments

chadwhitacre picture chadwhitacre  路  4Comments