iTranslated by AI
How to Set Up Creative Commons Licenses for GitHub Repositories
When creating a GitHub repository in a web browser, you can set various open-source licenses using the "Choose a license" field.
However, "free licenses" other than open-source licenses cannot be set there. This article introduces how to manually set CC Licenses for a GitHub repository.
The license for a GitHub repository can be specified in a LICENSE file directly under the repository root. Therefore, we will set the legal code of the CC Licenses as the LICENSE file.
Text versions of the CC Licenses legal code can be obtained from the following links:
- CC BY 4.0 (plaintext)
- CC BY-SA 4.0 (plaintext)
- CC BY-NC 4.0 (plaintext)
- CC BY-NC-SA 4.0 (plaintext)
- CC BY-ND 4.0 (plaintext)
- CC BY-NC-ND 4.0 (plaintext)
- CC0 1.0 legalcode.txt
Rename the obtained text file to LICENSE, place it in the repository root, and commit & push. This will make the repository's web display look something like this:
For example, while Zenn does not have a feature to set a license for articles, it is possible to set a license for the GitHub repository itself.
By the way, I have applied a CC BY-SA license to the repository for my articles here.
Please note that CC Licenses are not tuned for program code. If you wish to grant permission for the use of program code under a "free license," I strongly recommend applying an open-source license.
[Addition] Markdown Format License Files
It seems some people provide the CC Licenses legal code in Markdown format.
You can probably take the file from there and place it with the name LICENSE.md. However, GitHub doesn't seem to interpret these files, so the license type may not be displayed on the repository's web interface.
Still, it's true that Markdown is more human-readable. If anything, you could also use Shields.io to create a badge.
Discussion
種別表示はできないようですが、代りに見易いMarkdownの表示がしたいなら からもってくることも可能です、参考まで。
情報ありがとうございます。遅くなりましたが,記事に追記しました。
(更新は不要かもです)
Markdownの方ですが、ライセンス認識されるようになっています。
いつからかは不明ですが、けっこう前からです。
最近こちらの記事を再読したのでコメントしておきます。
情報ありがとうございます。ひとこと追記しておきました。
ありがとうございます。一応Qiitaにあったやつですが、正式表示できる意味ではあったほうがいい情報だろうとは思っていたので、のせてもらってすみませんw。
情報ありがとうございます。
LicenceをCC BY-SA 4.0にしたかったので、すごく役に立ちました。
README.mdを参考にさせていただきました。
かなり細かいところなんですが、
Repogitory for https://zenn.dev/spiegel (powered by Zenn)
Repogitory→Repositoryかと思います!おおっ,ホンマじゃ!
ありがとうございます。修正しました。
少しでもお礼ができてよかったです。
こちらこそありがとうございました。