1Password on Mastodon

Is it possible for 1Password CLI running on WSL to connect with 1Password hosted on Windows?

anishlranishlr
Community Member

Right now I can access 1Password on my WSL Debian installation using the CLI. But I have to enter my master password even when Windows is authenticated. I was just curious if it's possible to connect the two (a-la the SSH agent forwarding magic outlined here - https://1password.community/discussion/128023/ssh-agent-on-windows-subsystem-for-linux)


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser:_ Not Provided

Comments

  • Jack.P_1PJack.P_1P

    Team Member

    Hi @anishlr:

    There currently isn't any way of connecting 1Password CLI running in Windows Subsystem for Linux to 1Password for Windows running on the host. With that said, it's something I'd love to see too, so I'll share your feedback on an internal discussion we have about this. While I can't promise anything specifically, we use feedback like yours to help inform the future of 1Password.

    Jack

    ref: IDEA-I-1662

  • FWest98FWest98
    Community Member

    I would be very interested in this feature as well! Especially with the shell plugins recently introduced, that would be a great combination of being able to connect to GitLab from my WSL shell using Hello authentication.

  • Jack.P_1PJack.P_1P

    Team Member

    Hey @FWest98:

    I've noted your interest as well. Thanks for reaching out!

    Jack

  • thisdevdanethisdevdane
    Community Member

    Just to add to the list of people, that is something I wish for as well.

  • Jack.P_1PJack.P_1P

    Team Member

    Hey @thisdevdane:

    I've added you as well! 🙂

    Jack

  • mabusmabus
    Community Member

    +1 name for the list if it helps. :)

  • yami759yami759
    Community Member

    Another +1 here

  • matfaxmatfax
    Community Member
    edited January 26

    You can use the Windows cli binary, which is already connected to the host's 1Password instance, to access the data.

    alias op="op.exe"

    Obviously, op.exe needs to be accessible via the host's PATH or the WSL's PATH, or you'll have to specify the full path to the binary in /mnt/c/.../.

    Autocomplete works as well.

    eval "$(op completion zsh)"; compdef _op op.exe

    Unfortunately, this will only work for your own scripts because the binary's plugins still run on Windows and don't recognize the Linux shell, unless the plugin supports both platforms.

    Here's a sudo alias:

    alias sudo="sudo -S <<< $(op item get YOUR_ROOT_PASS_ID --fields label=password)"

    Or, as a separate command, since sudo -S removes its interactivity.

    alias sudoauth="op item get YOUR_ROOT_PASS_ID --fields label=password | sudo -Sv"

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file