Given that your key has expired.
$ gpg --list-keys
$ gpg --edit-key KEYID
Use the expire command to set a new expire date:
curl https://gist.githubusercontent.com/lukeramsden/81e029be19a686261dda4204c8002873/raw/bff6973325b159254a3ba13c5cb9ac8fda8e382b/prepare-commit-msg.sh > ~/.git-hooks/prepare-commit-msg
chmod u+x ~/.git-hooks/prepare-commit-msg
git config --global core.hooksPath ~/.git-hooks