Unorganized notes which may be useful during development.
- Start a fresh
sbt
session validate
release
(requires Sonatype credentials)- Verify the 2 new commits and 1 new tag in Git
sonatypeClose
sonatypePromote
- Push the new commits
- Push the new tag (e.g.,
git push --tags
)
(This is really only useful for testing the release process itself.)
- Start a fresh
sbt
session validate
release
(specify aSNAPSHOT
version when asked, e.g.,0.1.0-SNAPSHOT
; requires Sonatype credentials)- Delete the automatically created Git tag, e.g.,
git tag --delete v0.1.0-SNAPSHOT
There are several tutorials available on signing in Git (and using it on GitHub), for example this one and this one.
Here is a quick outline of the steps (if you're already familiar with GPG and Git, this might be enough):
- the key you want to use must be in your GPG keyring
- note your 64-bit key ID with
gpg2 --list-keys --keyid-format long
- configure Git to use the desired key for signing:
git config --global user.signingkey <your key ID>
- you can tell Git to use GPG v2 with
git config --global gpg.program gpg2
- make sure that signing commits is the default:
git config --global commit.gpgsign true
(you can omit the--global
to only sign by default the commits of the current repository) - make sure that signing annotated tags is the default:
git config --global tag.forcesignannotated true
Useful config options for GPG v2 (put them into ~/.gnupg/gpg.conf
):
keyid-format long
: display the long (64-bit) key ID by defaultwith-fingerprint
: display the full key fingerprint by defaultno-comments
: don't put comments into the.asc
outputno-emit-version
: don't write the GPG version number into the.asc
output
- export the authentication public key in SSH format with
gpg2 --export-ssh-key <key ID>
- add it to
~/.ssh/authorized_keys
/ GitHub / etc. - enable
gpg-agent
: adduse-agent
to~/.gnupg/gpg.conf
- enable the SSH support of
gpg-agent
: addenable-ssh-support
to~/.gnupg/gpg-agent.conf
- (reboot or at least restart X)
- make sure that
gpg-agent
is the running SSH agent:- the output of
echo $SSH_AUTH_SOCK
should contain the substringgpg-agent
- if it doesn't, other possible agents may need to be disabled:
- X11 default ssh-agent (disable with removing
use-ssh-agent
from/etc/X11/Xsession.options
) - GNOME Keyring agent (?)
- X11 default ssh-agent (disable with removing
- the output of
- the output of
ssh-add -l
should contain the auth key (if it's on a smartcard, only when the card is inserted)gpg-connect-agent updatestartuptty /bye
See this workaround.