Signing back into the Community for the first time? You'll need to reset your password to access your account. Find out more.
Forum Discussion
integralist
2 months agoNew Contributor
How to extract a
👋 I have the following script which attempts to extract a p12 from my 1Password vault: op item get "EXAMPLE" --vault "EXAMPLE" --format json | \
jq '.files[] | select(.name == "EXAMPLE.p12") ...
integralist
2 months agoNew Contributor
I spoke with 1Password support and they suggested I don't use `document get` but `op read` with `attribute=content` and specifying the section ID where the file is attached...
VAULT_ID=$(op item get "EXAMPLE" --vault "EXAMPLE" --format json | jq -r '.id')
SECTION_ID=$(op item get "EXAMPLE" --vault "EXAMPLE" --format json | jq -r '.sections[] | select(.label == "EXAMPLE") | .id')
op read --out-file /tmp/EXAMPLE.p12 "op://EXAMPLE/$VAULT_ID/$SECTION_ID/EXAMPLE.p12?attribute=content"