For any who gets this, i was able to resolve this error when trying to create a GPG key on MacOS (Intel chip) by following the instructions at [https://www.jvt.me/posts/2022/01/04/gpg-pinentry-loopback/][1]here.
gpg --full-gen-key --pinentry-mode loopback
'--pinentry-mode loopback' option is used to by pass the need for pinentry. see further details at [https://www.gnupg.org/documentation/manuals/gnupg24/gpg.1.html][2]. [1]: https://www.jvt.me/posts/2022/01/04/gpg-pinentry-loopback/ [2]: https://www.gnupg.org/documentation/manuals/gnupg24/gpg.1here.html