I use multiple accounts and look into using secret references as my environment variables.
How to I achieve this with multiple accounts:
This example above works when using a single account, not sure how to use this approach with multiple accounts.
1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser:_ Not Provided
Great question! It's only possible for 1Password CLI to be signed into a single 1Password account at a time.
For example, if I run
op signin, I can pick between my work account, and my personal account, and any references I use would be are
op://<vault name>//<item name>//<field>.
Would you mind sharing a bit more about your use case where you need secrets from two accounts?
I would love for the possibility to use secrets from multiple accounts in my env file. For example:
Unfortunately, I then get:
Error executing CLI command: "Personal" isn't a vault in this account. Specify the vault with its ID or name.
Error executing CLI command: "Private" isn't a vault in this account. Specify the vault with its ID or name.
Depending on the account I am logged in with.
Is there any chance this will be possible in a future release?