datawookie/emayili

Encryption tests on GitHub Actions with macOS

datawookie opened this issue · 4 comments

The encryption tests (test-encrypt.R) don't work on GitHub Actions with macOS.

This is what the error message looks like:

here() starts at /Users/runner/work/emayili/emayili
Found GPG 2.3.3. Using keyring: /Users/runner/.gnupg
Error: GPGME create key error: General error
Execution halted

Some leads which might be useful for solving this problem:

  1. Problem with where the keyring is being created. Maybe we don't have write access?
  2. Problem with gathering passphrase. Maybe the operating system is trying to get a passphrase by launching a dialog, which doesn't work on a non-interative session.
  3. Using an incompatible version of GPG. The version on macOS is 2.3.3, while that on Ubuntu (and Windows?) is earlier. I did see something online about a change in behaviour with version 2.3. Something to do with the type of key being created by default (not RSA?).

@matt-denni do you think you could help me with this? At present this test is disabled on Mac (skip_on_os(os = "mac")).

@datawookie I'm struggling to reproduce this issue on my system - key-pairs seem to be created with no issue and all tests in that file pass. I'm on Mac OS 10.15.7. I see you're using that you're testing on both MacOS 10.15 and 10.11. Out of interest - does the test fail on both? My GPG version is also 2.3.3.

OMG. This is very weird. I've just re-enabled those tests to find out whether they failed on one or the other (or both) versions of MacOS... and now they all pass. So this must have been something that they have fixed on the platform.

Thanks for your time looking at this, @matt-denni. And sorry to not have made this simple check before I asked (although I seriously am surprised that this has spontaneously fixed itself!).

image

Great to know that everything is working! It's a pleasure, and thanks for the update @datawookie.