Search in this blog

Thursday, June 22, 2017

Tag and release last updates on repository to pypi

Tag and release last updates on repository to pypi.

At first GPG key pair should be created. Look for previous post about it.

Checkout to required branch:
$ git checkout master
Create signed version tag:
$ git tag -s 0.1.13
Verify tag that was created:
$ git tag -v 0.1.13
Check list of git remotes:
$ git remote
gerrit
origin
Push tag to gerrit remote:
$ git push gerrit 0.1.13

Generate GPG key pair for git commits

Use command:
$ gpg --gen-key
Select default options (or specify other).

  • Select what kind of key you want: (1) RSA and RSA (default).
  • RSA keys may be between 1024 and 4096 bits long.
  • Please specify how long the key should be valid: 0 = key does not expire.

Then enter your real name, email address and comment.
Then we need to generate a lot of random bytes for entropy. Load computer with disk operations to provide random number generator a better chance to gain enough entropy.
Wait while public and secret keys will be created.

List keys:
$ gpg --list-keys
/home/username/.gnupg/pubring.gpg
-----------------------------------
pub   2048R/9DA4A3D1 
...

Configure the key before using it for single repository, or globally if you are going to use the same key for every repository:
$ git config user.signingkey 9DA4A3D1 
$ git config --global user.signingkey 9DA4A3D1

Done.