Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

A secret reference doesn't resolve

devo secret run, devo secret read, devo secret inject, or an AI client can't turn a devo:// reference into a value. With devo secret run, Devolutions CLI stops before your program starts, so nothing runs with a missing secret.

Why it happens

  • The reference isn't written correctly (invalidSecretReference).

  • The reference points at another workspace than the selected context.

  • The vault, entry, or field doesn't exist, or your account can't read it.

  • The workspace type can't read that field, or that form of reference.

  • A template uses a variable that isn't set.

Test a reference without reading any secret: devo secret run --check --env-ref TEST=<reference> -- <your-command> checks that the command exists and that every reference is well formed, without reading any secret or starting the command. See Run a command with its secrets.

Fix it

1

Copy the reference again

Most problems disappear when you copy the reference from Devolutions CLI instead of typing it:

devo entry references "<entry-name>" --vault-name "<vault-name>"

It lists every reference of the entry, never the values. On Devolutions Server, the list contains canonical references (devo://ws/…/vault/…/entry/…/field/…). Use them as they are. See Find the reference to a secret.

2

Fix the syntax

invalidSecretReference comes with a message that says what's wrong:

MESSAGE
FIX

"Secret reference must start with 'devo://'."

Add the devo:// prefix.

"Use devo://<workspace>/<vault>/<entry>/<field> or devo://<workspace>/<vault>/<entry>/<section>/<field>."

A named reference has four parts, or five with a section. Check for a missing or extra /. A name that contains a / must be written %2F.

"Secret reference path segments cannot be empty."

Remove the double // inside the path.

"Canonical ID references must use devo://ws/<id>/vault/<id>/entry/<id>/field/<field>."

Keep the words ws, vault, entry, and field in that order, each followed by its value.

"Secret references do not support URI fragments."

Remove the # and what follows it.

unsupportedSecretAttribute means the ?attribute= part isn't one of value, type, id, title, purpose, or otp. It also appears when a command needs the secret value, for example devo secret run, and the reference asks for another attribute: on every workspace type, a value can only come from value. Remove the ?attribute= part, or set it to value. The value-free attributes type, id, title, and purpose work with devo secret read and devo secret get on all three workspace types. The complete syntax is in Secret reference syntax.

3

Use the right context

The first part of a named reference is the workspace. On Devolutions Cloud and Devolutions Server, it must match the selected context, or Devolutions CLI refuses with providerSelectionChanged: "The secret reference workspace does not match the selected cloud source context."

  1. Check the selected context:

    devo status
  2. Run the command with the context the reference belongs to:

    devo secret run --context <context-name> --env-ref DB_PASSWORD=<reference> -- <your-command>

To make that context the default, use devo context use <context-name>. See Switch between workspaces.

4

Check that the entry and the field exist

  • entryNotFound or vaultNotFound: the name doesn't match anything your account can see. Check the spelling with devo entry list "<entry-name>" --vault-name "<vault-name>". A renamed entry breaks a named reference: switch to the canonical reference, which uses IDs and survives renames.

  • entrySelectorAmbiguous: several entries share that name. Use the canonical reference.

  • serverSecretNotFound: Devolutions Server didn't find the field, or this account isn't allowed to read it.

  • cloudSecretFieldUnavailable: Devolutions Cloud can't return that field for this entry. Check that the field is filled in.

5

Use a field the workspace can read

Each workspace type reads different fields. devo secret capabilities lists them without reading any secret.

  • Devolutions Cloud reads the main fields of an entry, such as password, username, domain, host, port, url, and privatekey, without a section. A reference with a section stops with unsupportedSecretField.

  • Devolutions Server reads one entry data property, such as password or username, without a section.

  • --stdin-reference of devo secret run takes one exact devo:// reference, named or canonical. Anything else stops with invalidSecretStdinReference.

6

Set the variables the reference uses

In a template filled by devo secret inject, a reference can contain environment variables, such as devo://${WORKSPACE}/…, with an optional default value: ${WORKSPACE:-<default>}. missingSecretReferenceVariable means a variable isn't set and has no default: "Environment variable '<name>' is required by the secret reference." Set it in the terminal or pipeline that runs the command. A ${ without its closing } is refused too. See Fill a configuration file from a template.

Still failing?

Make sure you're signed in: an expired session also stops resolution. See Sign-in fails or the session expired. Then collect diagnostics and contact Devolutions support. Send the reference if you like, it holds no secret, but never the value.

Last updated

Was this helpful?