Forum Discussion

daniels's avatar
daniels
New Contributor
6 months ago

Reference for Private vault copied from GUI doesn't work in CLI

I use the `op` cli with a personal/family account. When I right click a password/key in the GUI in my Private account and selects "Copy Secret Reference", the reference starts with "op://Private". If I tried to read the reference using `op read` it fails with 

[ERROR] 2025/08/08 15:24:36 could not read secret op://Private/{Item}/{Field}: could not get item Private/{Item}: "Private" isn't a vault in this account. Specify the vault with its ID or name.

So I have to replace the vault segment it with "Personal" or the vault reference hash to make it work with `op`. This is really inconvenient.

Why is this happening? Is there anything I can do to fix it? (The "Private" vault can't be renamed.)

4 Replies

  • praseodym's avatar
    praseodym
    New Contributor

    I have the same issue: the 1Password GUI copies the secret reference with "Private" as the vault name, but the CLI does not recognize this and expects "Personal" as the vault name. Changing the vault name in the secret reference from "Private" to "Personal" works, but it would be a lot more convenient if the GUI would create a secret reference that just works.

  • Hi daniels​ ,

    Sorry for the delay, for your setup.  Do you have more than 1 1Password accounts on this machine?  Also one thing you can try is "op signin" to make sure that the CLI is pointing to your 1Password account.

    Thanks!
    Phil

    • daniels's avatar
      daniels
      New Contributor

      Thanks for the reply, Phil!

      There is only one account. It was originally a personal account but I upgraded it to a family account a few years ago.

      I’ve now tried `op signin` and the problem persists after this.

      Which side (GUI/CLI) is it that handles this wrong? I.e. what is the actual name of my vault, and how can I tell? (I guess it may be a problem of two truths.)

      Kind regards

      /Daniel

      • 1P_Phil's avatar
        1P_Phil
        Icon for Moderator rankModerator

        Hi daniels​ ,

        Sorry for the delay, this one fell through the cracks.  

        I think the best thing to do is in the CLI to grab the VaultID and make sure that the item you are trying to access is contained within that vault.

        // Pick the account you want to use
        op signin
        
        // This will show your vault and vault IDs, you should see the Private one
        op vault list

        It will show a list of unique vault ID's followed by the human readable name like this

        Let from here you can use the unique Vault ID in your call

        op item get [unique item id] --vault=[unique vault id]

        and you should be able to piece the correct info together to do create the op URI.

        I hope this helps.

        Phil