...it is possible to license repositories[...]
Yes.
As @Rsinohara said in the comments, Github itself offers the option to choose a license when creating the repository:
By choosing a license from pre-existing options, Github itself will already include the file LICENSE
in your root folder, with the terms of the chosen license:
To change a previously allocated license, enter the file LICENSE
, and click on the edit icon:
And then the option to change the license will appear in the right corner:
It is also possible to include additional terms to the chosen license:
and if there is any license
of software that:
Ensure that I am the author of the software (avoid plagiarism).
Restrict the software modification.
I don’t quite understand what your intention is (restrict = prohibit use in whole or in part?), but apparently you don’t want to use a free software license.
So on Github you should choose the "None" option, or create a proprietary license, only with the specific terms by which you allow code usage.
You might as well create a "pavê" license, like:
All rights reserved. The author allows only the visualization of the code, being prohibited any use thereof, in whole or in part.
But even if you do not use any license, your code will already be protected by the Copyright Law and the Computer Program Law.
I will copy here an excerpt from a wiki that I am writing about this theme, to try to facilitate the understanding of this part of the question:
...
And what rights are reserved?
The law divides copyright into moral and patrimonial. Moral rights are irrevocable and inalienable (see all moral rights of the author in art. 24 of Law 9,610/98.)
However, in the specific case of computer programs, Law 9,609/98 retained only two of the author’s moral rights:
§ 1º The provisions concerning moral rights do not apply to the computer program, except at any time for the right of the author to claim paternity of the computer program and the right of the author to object to unauthorised amendments where they involve deformation, mutilation or other modification of the computer program, which harm their honour or reputation.
(The end of this paragraph is very reminiscent of the BSD license, as we will see below)
Among the property rights of the author (Law 9,610/98) are:
Art. 29. Depends on prior and express authorisation the author’s use of the work, by any means, such as:
I - a
partial or full reproduction;
II - the edition; [...]
VI - to
distribution, when not intrinsic to the contract signed by the author with
third party for the use or exploitation of the work;
VII - the distribution to
the provision of works or productions by means of cable, optical fibre, satellite,
waves or any other system that allows the user to perform the
selection of the work or production to perceive it in a time and place
previously determined by whom formulates the demand, and in the cases in
that access to works or productions is made by any system which
import in payment by the user;
"Icing on the cake" of copyright protection of computer program are the criminal implications:
Art. 12. Copyright infringement of computer program:
Feather -
Detention of six months to two years or fine.
§ 1 If the violation
consist in the reproduction, by any means, of a computer program,
in whole or in part, for trade purposes, without express authorisation
of the author or of the person representing him:
Feather - Imprisonment of one to four years
and fine.
§ 2º Na same penalty of the previous paragraph sells,
expose to sale, introduce into the country, acquire, conceal or deposit,
for trading purposes, original or copy computer program,
produced with copyright infringement.
So, briefly (as far as I can) these are the rights that free software licenses intend to "soften".
To have these rights you do not need to do anything, no registration is necessary to have the rights protected (but if there is a dispute of authorship you will be a happier person if you have made the registration ;) ).
...
If yes how do I assign the license to my application?
About that, besides of this answer, Note the following (here’s another excerpt from the wiki I’m creating):
...
So when you create a "computer program" (any Hello word!
of life), its creation is protected by the laws 9.610/98 and 9.609/98.
And that even without you having held any record, regardless of your will:
art. 18. The protection of the rights dealt with by this Law is independent of
registration.
The registration in the INPI may be important to prove the authorship of the program, but according to the Law is only one option:
Art. 19. The author is allowed to register his work in the public body
defined in caput and in § 1º of art. 17 of Law nº 5.988 of 14
december 1973.
There are other possible ways to prove the authorship of a program - some say just send a simple email to yourself - but you can even register on paper in a notary office (thus proving the date of publication and authorship)or even simply host on an established and reliable server (which may eventually attest to the date the files were uploaded to the server).
However, as it is not so expensive (relatively), I believe that the most appropriate is register by INPI, since Regulatory Decree 2256/98 specifically established that
" Art. 1º The computer programs may, at the discretion of the holder of the respective rights, be registered at the National Institute of Industrial Property - INPI.".
...
I think you have two questions there and one of them has already been answered: http://answall.com/q/46063/101
– Maniero
Github itself, when you create the repository, asks for the license, and right next to it presents a link to a site made to choose the license. This site gives you information and tips on which license to choose.
– RSinohara