theonedev/onedev · error · ExplicitException
Unrecognized interpolation variable: ${t}
Error message
Unrecognized interpolation variable: ${t} What it means
This is the workspace-provisioner counterpart of the job registry login error: RegistryLogin.getFacade() interpolates the registry URL/username with WorkspaceVariableInterpolator, which only recognizes WORKSPACE_TOKEN and SERVER_URL. Any other ${...} variable throws this ExplicitException, indicating an unsupported or misspelled placeholder in the workspace registry configuration.
Source
Thrown at server-core/src/main/java/io/onedev/server/model/support/administration/workspaceprovisioner/RegistryLogin.java:82
@Editable(order=300, name="Password", description = "Specify password or access token of specified registry")
@NotEmpty
@Password
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public RegistryLoginFacade getFacade(String workspaceToken) {
var interpolator = new WorkspaceVariableInterpolator(t -> {
if (t.equalsIgnoreCase(WorkspaceVariable.SERVER_URL.name()))
return OneDev.getInstance(SettingService.class).getSystemSetting().getServerUrl();
else if (t.equalsIgnoreCase(WorkspaceVariable.WORKSPACE_TOKEN.name()))
return workspaceToken;
else
throw new ExplicitException("Unrecognized interpolation variable: " + t);
});
return new RegistryLoginFacade(
interpolator.interpolate(getRegistryUrl()),
interpolator.interpolate(getUserName()),
getPassword());
}
}View on GitHub (pinned to d44925c47c)
Solutions
- Edit the workspace-provisioner container registry settings and use only ${serverUrl} or ${workspaceToken} in URL/username
- Remove or escape stray ${...} placeholders that were copied from job settings
- Re-run provisioning to verify interpolation succeeds
Example fix
// before (workspace registry username)
username: "ws-${jobToken}"
// after
username: "ws-${workspaceToken}" Defensive patterns
Strategy: validation
Validate before calling
java.util.regex.Matcher m = java.util.regex.Pattern.compile("\\$\\{([^}]+)\\}")
.matcher(registryLogin.getRegistryUrl() + registryLogin.getUserName());
while (m.find()) {
String v = m.group(1);
if (!v.equalsIgnoreCase("SERVER_URL") && !v.equalsIgnoreCase("WORKSPACE_TOKEN"))
throw new ValidationException("Unsupported variable: " + v);
} Try / catch
try {
var facade = registryLogin.getFacade(workspaceToken);
} catch (ExplicitException e) {
logger.error("Bad workspace registry variable: {}", e.getMessage());
} Prevention
- Use only ${serverUrl} and ${workspaceToken} in workspace registry settings
- Don't copy job-context variables into workspace settings
- Validate configs after upgrading OneDev
When it happens
Trigger: Configuring a container registry for workspace provisioning with a registry URL or username containing a ${...} variable other than ${serverUrl} or ${workspaceToken}, then triggering workspace provisioning.
Common situations: Copying variables from pipeline/job contexts (e.g. ${jobToken}) into workspace registry settings; typo in variable name; leftover template placeholders.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Unrecognized interpolation variable: ${t}
- Specified workspace provisioner '${provisioner}' is disabled
- No applicable provisioner discovered for current workspace.
- Unrecognized command:
- Unable to discover cluster ip from database connection url:
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/8053dacf889c33f1.
Report an issue: GitHub.