How to reference a secret with its field name including unsupported characters?

sungx2
sungx2
Community Member

I'm new to 1password-cli, and I wish to load secrets into config files as documented. But since some of my items are constructed in Mandarin, their field names are sometimes in Mandarin too. For example, I generated an SSH key through the Github webpage, where the "private key" field is shown in Mandarin ("私密金鑰"), and I can neither access the private key through op read op://Private/Github/private\ key nor op read op://Private/Github/私密金鑰. The error messages are:

[ERROR] 2022/03/27 15:48:27 could not read secret op://Private/Github/private key: item Private/Github does not have a field private key

[ERROR] 2022/03/27 14:55:15 could not read secret op://Private/Github/私密金鑰: invalid secret reference 'op://Private/Github/私密金鑰': invalid character in secret reference: `私`

How can I deal with it?

My 1password-cli version is 2.0.0, installed via Homebrew.


1Password Version: 8.7.0 beta
Extension Version: Not Provided
OS Version: macOS 12.3

Comments

  • Hey @sungx2,

    Thanks for reaching out to us!

    Let me know if specifying the private key by id works. In the case of SSH, the id of the private key is private_key, so your full reference would look like op://Private/Github/private_key. Please confirm that the id is the same in your case, by running op item get Github --vault Private --format json and making sure the private key ID is indeed private_key. If this is not the case, let me know and we can pick it from here.

    Best,
    Horia

  • sungx2
    sungx2
    Community Member

    Hi @Horia.Culea_1P,

    Thanks for the help! It works!

  • Glad! Let us know if you encounter any other problems, we're here to help!

    Best,
    Horia

This discussion has been closed.