Creating

gpg --full-generate-key

Exporting

gpg --export-secret-keys --output 'keyfile.gpg' 'keyid'

Importing

  1. Import the key: gpg --import <keyfile>
  2. Trust the key: gpg --edit-key <keyid> and then trust, then choose 5 for ultimate trust (or other type of trusts).
  3. Verify the key: gpg --list-secret-keys. The key should have ultimate trust.