Forum Discussion

voichould's avatar
voichould
New Member
2 hours ago

op read can't access labeled website URLs, only the primary one

I have a Login item with multiple website URLs, each with a different label. For example, a self-hosted service with:

- website (primary) — the public URL through a reverse proxy
- local network — the LAN address with a valid cert

Reading the primary one works:

$ op read "op://Private/My Server/website"
https://myserver.example.com/

But there's no way to get the labeled one:

$ op read "op://Private/My Server/local network"
[ERROR] could not read secret: item does not have a field 'local network'

The URLs show up in op item get --format json under the urls array, but they aren't fields, so op:// references don't work.

I inject secrets into scripts via .env files and op:// references. Works for everything except labeled URLs. Right now, I have to fall back to:

op item get "My Server" --format json | jq '.urls[] | select(.label=="local network") | .href'

which doesn't fit the op:// pattern and can't be used in .env files.

It'd be useful if labeled URLs were referenceable, something like op://Vault/Item/urls/local network or whatever syntax makes sense.

op v2.30.3, macOS.

No RepliesBe the first to reply