Skip to main content

License your GitHub repository

Licences help you manage and share intellectual property for code and materials on GitHub. If you want to consume, share or contribute to anything in GitHub, you have to understand requirements associated with the relevant licence.

On this page

Licence guidelines

Note if the licence attached to material restricts modification or redistribution of the content. If a licence isn't attached to content, assume that it's "all rights reserved" and can't be used without the express permission of the copyright owner.

Contribute to a project

If you want to contribute to an existing, outside project, make sure you understand the applicable licence and contributor requirements. If the project needs copyright assignment or a contributor agreement, contact the Legal Services Branch before taking any action.

Initiate a project

If want to initiate a project or release previously created materials, be aware that the Province can only license rights that it is in a legal position to grant to others.

The Province’s intellectual property rights must be, at a minimum, equal to the rights under which the content will be licensed to third parties. Four open licences are approved for use that likely cover the majority of projects coming forward:

Authority to license

The Intellectual Property Program (IPP) must approve licences of B.C. government owned intellectual property unless a ministry has either specific legislative authority or Treasury Board approval that lets them license the intellectual property rights of the Province to third parties. When IPP is the authority for the licensing, you work with IPP to find the best fit to meet the licensing needs of the project.

IPP examines the development history of the content, which can take the form of a conversation. Initial questions include the following:

  • Is the content created solely by B.C. government employees?
  • Does the content contain only content owned by the B.C. government? Have you made sure that it doesn't contain any third-party content?
  • Can you confirm that there are no terms of use or exclusive licensing arrangements that prohibit the Province from posting and licensing the content on GitHub?

Preferred licenses

Use these licences, as they are widely accepted, and follow a consistent approach to licensing. This increases efficiency for both developers and consumers.

If your project is better suited to a different licence, discuss your requirements with the IPP. They can help answer your questions and advise on your need for any other legal or risk management advice.

Choose a licence

The following overview provided is intended to inform, not replace, the licensing review for each project. If you think you need to engage with the Intellectual Property Program, send a request to the IPP Manager

A flowchart that helps you choose a licence

If your project is related to a community that typically uses a different licence than one of the preferred licences described above, or if you have any questions about which licence best applies to your project, contact IPP.

A flowchart to outline code preparation for GitHub

Apply the licence to your project

Place the licence file for your project in the repository before you do anything else. The default license for code repositories is Apache 2.0.

Use the following boiler-plate text in the comments header of every source code file, as well as the bottom of your

Copyright 2019 Province of British Columbia

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

For repositories that are made up of docs, wikis or other non-code files, the default licence is Creative Commons Attribution 4.0 International. It should look like this at the bottom of your

Creative Commons Licence
YOUR REPO NAME HERE by the Province of British Columbia is licensed under a Creative Commons Attribution 4.0 International License.

The code for the Creative Commons 4.0 footer looks like this:

<a rel="license" href=""><img alt="Creative Commons Licence"
style="border-width:0" src="" /></a><br /><span
xmlns:dct="" property="dct:title">YOUR REPO NAME HERE</span> by <span
xmlns:cc="" property="cc:attributionName">the Province of British Columbia
</span> is licensed under a <a rel="license" href="">
Creative Commons Attribution 4.0 International License</a>.

Related links: