Forum Discussion
CLI Bug - Item edit fails from within GitHub Action
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