Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
System
3 years agoSuper Contributor
Authorization prompt dismissed error [Linux]
This discussion was created from comments split from: BUG: cli auth prompt immediately dismissed with Apple Watch [macOS].
Former Member
3 years agoI'm an Archlinux user using herbstluftwm, for others not using a desktop environment, this might be helpful. The way I worked around this was to first ensure a polkit agent was running (/usr/lib/polkit-kde-authentication-agent-1 in my case, there's a gnome equivilent). Thanks to 1passj1282 for the tip there!
Once you have this running, you will get a password prompt. This is still annoying because it happens in every terminal, not just once. Kinda pointless if you already unlocked the GUI App. So what you can do here is take that Action ID ("com.1password.1Password.authorizeCLI") and create a custom polkit rule to not require your password. For me, I find this to be acceptible because this only works if I've already unlocked the GUI.
The Arch wiki entry on Polkit explains the rest here, but here's my specific solution.
I'm part of the "wheel" group, so that suffices for me, but you can replace that with any suitable group. I placed the rule in /etc/polkit-1/rules.d/49-nopasswd_op.rules
/* /etc/polkit-1/rules.d/49-nopasswd_op.rules
* Allow members of the wheel group to connect the op cli with the 1password app
*/
polkit.addRule(function(action, subject) {
if (action.id == "com.1password.1Password.authorizeCLI" && subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
Logout/reboot and now once the 1Password GUI App is unlocked, the cli authorizes without prompt.
[edit by @Joris_1P:] Please note that this will also allow the 1Password app to be unlocked without a password by using the CLI (see comment below).