Skip to content

/public/newnm/resend_challenge crashes on unusable (i.e. expired) key

from prod:

File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in _get_response
  115.                 response = self.process_exception_by_middleware(e, request)

File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in _get_response
  113.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/lib/python3/dist-packages/django/views/generic/base.py" in view
  71.             return self.dispatch(request, *args, **kwargs)

File "/srv/nm.debian.org/nm2/backend/mixins.py" in dispatch
  77.         return super(VisitorMixin, self).dispatch(request, *args, **kwargs)

File "/usr/lib/python3/dist-packages/django/views/generic/base.py" in dispatch
  97.         return handler(request, *args, **kwargs)

File "/srv/nm.debian.org/nm2/public/views.py" in get
  512.         encrypted = key.encrypt(plaintext.encode("utf8"))

File "/srv/nm.debian.org/nm2/keyring/models.py" in encrypt
  180.             return gpg.run_checked(cmd, input=data)

File "/srv/nm.debian.org/nm2/keyring/models.py" in run_checked
  402.                 stderr.strip()

Exception Type: RuntimeError at /public/newnm/resend_challenge/jlebleu
Exception Value: /usr/bin/gpg --homedir /srv/nm.debian.org/nm2/data/tmp_keyrings/tmp7r7gu4uc -q --no-options --no-auto-check-trustdb --trust-model always --with-colons --fixed-list-mode --with-fingerprint --no-permission-warning --no-tty --batch --display-charset utf-8 --encrypt --armor --no-default-recipient --trust-model=always --recipient 343389FCF05C322DA1864A7CF8FA7CF80D8981C exited with status 2: b'gpg: 1343389FCF05C322DA1864A7CF8FA7CF80D8981C: skipped: Unusable public key\ngpg: [stdin]: encryption failed: Unusable public key'

Checking 1343389FCF05C322DA1864A7CF8FA7CF80D8981C I see that key is expired at this time.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information