passbolt / passbolt_cli

Command line interface for passbolt API
GNU Affero General Public License v3.0
149 stars 30 forks source link

Problems running without a TTY #30

Closed ggutenberg closed 5 years ago

ggutenberg commented 5 years ago

I'm trying to get passbolt_cli working on Jenkins. I've gotten to the point where all of the GPG stuff appears to be working correctly, keys are being imported and trusted, etc. The problem arises when I run passbolt auth login -p <password>. I've built a Docker image for all of this, and when I run it locally it works perfectly. However in Jenkins, where there is no TTY, I get the following error (with --verbose):

No authentication cookie found
GPGAuth login start with fingerprint 29E2EDCD1EAD45050AF054B467D0634C30054E98
POST https://my.passbolt.server//auth/verify.json
200
POST https://my.passbolt.server//auth/login.json
200
POST https://my.passbolt.server//auth/login.json
200
GPGAuth you are now logged in
GET https://my.passbolt.server//auth/checkSession.json
200
gpg: no valid OpenPGP data found.
gpg: processing message failed: Unknown system error

I've followed the instructions here https://community.passbolt.com/t/passbolt-cli-p-switch-is-ignored/2075 to get past the pinentry problem, and I've also added no-tty to ~/.gnupg/gpg.conf. I'm not really sure what else to try, or how to further debug. Any suggestions would be greatly appreciated.