Protect what matters – even after you're gone. Make a plan for your digital legacy today.
Forum Discussion
twoellert
2 years agoNew Contributor
CLI Bug - Item edit fails from within GitHub Action
Hey,
I noticed a bug in the 1password CLI if you use it from within a GitHub Action. The issue occurs when editing an existing item in a 1password vault.
Command to call from within a GitHub Ac...
twoellert
2 years agoNew Contributor
Hey Anush008
I am in contact with 1password support and they mentioned a workaround which works.
You can do it by modifying the downloaded JSON format and uploading it again as JSON. For example this modifies the "value" in the 2nd entry of the "fields" structure in the JSON file and pipes it to the edit command:
op item get test --vault "MyVault" --format json > newItem.json
jq '.fields[1].value = "newpassword"' newItem.json >> newItem-modified.json
cat newItem-modified.json | op item edit test --vault "MyVault"
Sadly it does not work for all field types. For example if you have a "File" field (so you attached a file to the 1password item) you cannot upload a new file to this field that way. But for all regular fields containing only text it should work.
Hope that helps in your case.
Tom