Get Started with GnuPG

Get Started with GnuPG

Install

I'll assume you'll want to use GnuPG v2.

If you're using Ubuntu install from the repos.

user@host:~$ sudo aptitude install gpgv2

You can also install from Nix package manager. It'll usually have newer versions available than the Ubuntu respos (especially if it's LTS).

user@host:~$ nix-env -i gnupg-2.1.1

WARNING: This is a "living document" and will be updated as I learn from my mistakes.

Generate Your Key Pair

You'll need a lot of entropy while generating a key pair. I don't know how much it helps but I run the following in a separate terminal window while I generate a key pair.

user@host:~$ dd if=/dev/urandom of=/dev/null

While the dd process is running, run the following in a different terminal window to generate your key pair.

user@host:~$ gpg2 --gen-key

You'll be asked for your real name and email address. This constructs an identity for you. Make sure to use your actual information here.

You will also be asked to provide a passphrase. Choose a secure passphrase and do not lose it. It's often recommended to keep a printed copy in a safe place, locked away from prying eyes.

Read more …

git pull SSL Certificate Problem

git pull SSL Certificate Problem

When trying to git pull pkgsrc repo from GitHub I saw an SSL error:

user@host:~/opt/pkgsrc$ git pull
fatal: unable to access 'https://github.com/jsonn/pkgsrc.git/': SSL certificate problem: unable to get local issuer certificate

I tested this guide on Ubuntu 14.04 with Nix package manager.

Note: I was using a git version pulled in from Nix. The git from Ubuntu was working just fine.

Read more …

Install Python from Source in Linux

Install Python from Source in Linux

This guide is for when you need to install a Python release different from what comes with your distribution in the repos. We'll install it to our home directory. This guide was tested to be working on Ubuntu 14.04.

Read more …