Forum Discussion

pejax's avatar
pejax
New Contributor
7 days ago

op read by category

My bank entries live in 3 categories (Login, Credit Cards, Bank Accounts) by the same name.

Trying to read the (login) password:
op read "op://Personal/<Bank Name>/password"
I get a "More than one item matches..." error (of course).

I also tried something like:
op read "op://Personal/<Bank Name>/password" --category login
but it does not work.

Is the a way to qualify a read by category - something I overlook?
Thanks

 

 

 

1 Reply

  • Michael_Mercuri's avatar
    Michael_Mercuri
    Dedicated Contributor

    If you have multiple items in your 1Password vault with the same name, I think your choices are:

    1. Rename items to be unique (maybe difficult if you have MANY items with the sam name)
    2. Use "secret reference" More here: 

      https://developer.1password.com/docs/cli/secret-references/

    Regarding "secret references": in a nutshell you navigate to the password field (or whatever field you need) in 1Password App, then right click > copy secret reference. Then you have a unique identifier to use in the CLI directly to the field you need.