theonedev/onedev · error · ExplicitException
No applicable provisioner discovered for current workspace.
Error message
No applicable provisioner discovered for current workspace. Please add a shell provisioner in menu 'Administration / Workspace Provisioners'
What it means
Same auto-discovery failure as the container case, but for specs that do not require a container: no applicable enabled provisioner was found and the guidance is to add a shell provisioner so workspaces can be provisioned on the server host.
Source
Thrown at server-core/src/main/java/io/onedev/server/workspace/DefaultWorkspaceService.java:766
return settingService.getWorkspaceProvisioners().stream()
.filter(it -> it.isEnabled() && isApplicable(workspace, spec, it))
.findFirst()
.orElseThrow(() -> new ExplicitException("No applicable workspace provisioner"));
} else {
logger.log("No workspace provisioner defined, auto-discovering...");
var provisioner = discoverProvisioner(workspace, spec);
if (provisioner != null) {
logger.log("Discovered " + EditableUtils.getDisplayName(provisioner.getClass()).toLowerCase());
return provisioner;
}
if (spec.isRunInContainer()) {
throw new ExplicitException("""
No applicable provisioner discovered for current workspace. \
Please check if docker is installed on OneDev server, or configure \
a kubernetes provisioner if you would like workspaces to run as pods""");
} else {
throw new ExplicitException("""
No applicable provisioner discovered for current workspace. \
Please add a shell provisioner in menu 'Administration / Workspace Provisioners'""");
}
}
}
private Future<Void> run(Workspace workspace) {
Workspace.push(workspace);
try {
var spec = workspace.getSpec();
if (spec == null)
throw new ExplicitException("Spec not found in workspace project hierarchy");
var interpolator = new WorkspaceVariableInterpolator(workspace);
spec = interpolator.interpolateProperties(spec);
String token = workspace.getToken();
var project = workspace.getProject();View on GitHub (pinned to d44925c47c)
Solutions
- Add a Shell Workspace Provisioner in Administration > Workspace Provisioners.
- Or enable/configure a docker/kubernetes provisioner if container execution is desired.
- Restore previously removed/disabled provisioners in the settings.
Defensive patterns
Strategy: validation
Validate before calling
// via settings API: assert at least one enabled workspace provisioner exists before dispatching jobs
Try / catch
try { provision(...); } catch (ExplicitException e) { if (e.getMessage().contains("shell provisioner")) { /* add shell provisioner in admin settings */ } } Prevention
- Verify a shell provisioner exists after installing or migrating OneDev.
- Include provisioner settings in server config backups/restore checks.
- Don't delete default provisioners without replacing them.
When it happens
Trigger: Job/workspace spec with runInContainer false (or unset); no named provisioner; no enabled shell provisioner (nor any other applicable provisioner) in Administration > Workspace Provisioners.
Common situations: Fresh OneDev install where default shell provisioner was deleted/disabled; workspace provisioners settings cleared; after migrating settings between instances.
Related errors
- Specified workspace provisioner '${provisioner}' is disabled
- Unrecognized interpolation variable: ${t}
- Specified workspace provisioner '${provisioner}' is not appl
- No applicable provisioner discovered for current workspace.
- This workspace can only be provisioned by shell provisioner
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/29d771e10557156f.
Report an issue: GitHub.