Skip to main content
Dec 5, 2022 8:25 PM UTC
Question

Calling the CLI from a Go program

I'm working on a Go program and I want to call op, using the PolKit/app integration so a dialog appears prompting the user to type in their password. This works when I run op directly from my shell, but it does not work when I exec op from my Go program. So far what I have is effectively exec.Command("/usr/local/bin/op", ...).Output(). However, that is failing with [ERROR] 2022/12/05 14:23:19 error initializing client: connecting to desktop app: read: connection reset, make sure the CLI is correctly installed and Connect with 1Password CLI is enabled in the 1Password app. All --debug does is add DEBUG | NM request: NmRequestAccounts.


1Password Version: CLI 2.7.3, desktop 8.9
Extension Version: 2.3.8
OS Version: Gentoo Linux
Browser:_ Firefox

22 replies

Jun 15, 2023 12:04 PM UTC

Hey all!

Thanks for your patience. I'm checking back in to let you know that we released a new beta version of 1Password for Linux (https://releases.1password.com/linux/beta/#1password-for-linux-8.10.8-24) yesterday that should allow you to use the CLI from a program that itself is not owned by root. You can follow the instructions https://support.1password.com/betas/?linux to install a beta release of the app. The fix will also be included in the next minor stable release, which will be out in a few weeks.

Let me know if that fixes the problem for you.

Joris

Jun 29, 2023 7:56 AM UTC

Quick update on this: we've now also released https://releases.1password.com/linux/8.10/. That means the fix is now available on all release channels.