def _verify(self):
        """Some sanity checks on GPG."""
        if not self.keyid:
            raise ValueError('No GPG key specified for signing, did you mean to use --no-sign?')
        sign = self.gpg.sign('', keyid=self.keyid)
        if 'secret key not available' in sign.stderr:
            raise ValueError('Key not found')
        elif 'NEED_PASSPHRASE' in sign.stderr:
            self.passphrase = getpass.getpass('Passphrase for GPG key: ')
Some sanity checks on GPG.