published fresh until

Expected a step; Permission denied: how do I fix Jenkins?

Summary As of November 2026, Jenkins Pipeline errors need separate fixes for Declarative syntax, agent provisioning, workspace ownership, credential lookup and plugin dependencies. Start with the first matching message; Jenkins LTS 2.580.2 is the official reference baseline, checked 2026-11-15.

Not for iOS signing on CI, see ios-code-signing-fails-on-ci-fastlane-match-readonly-setup-ci; agent cleanup guardrails, see docker-official-skills-destructive-guardrails-compose

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The problem

Match the first relevant Jenkins message to its diagnostic branch before changing Pipeline syntax, agent setup, workspace permissions, credentials or plugins.

Versions and status, checked 2026-11-15

Not for: iOS signing on CI or Docker agent cleanup guardrails.

ComponentOfficial reference fetched todayImplication
Jenkins LTS2.580.2, released 2026-10-28, tested JDKs 21 and 25 in the changelogRecord controller and agent Java separately
Core licenceMIT in the official source headerPlugin licences are separate and not asserted
PluginsNo universal version set verifiedInspect installed versions and dependency/core requirements

Which branch?

Failure pointInvestigate
Parser line/columnDeclarative grammar
Queue/offline nodeLabels, executors, launch logs and pod events
Workspace writeRuntime UID and ownership
Credential lookupID, scope and binding kind
Controller startupFirst dependency failure, before the cascade

1. Expected a step

Exact example WorkflowScript: 17: Expected a step @ line 17, column 11. comes from Xianpeng Shen's Jenkins post (2026-06-08; checked 2026-10-20).

Declarative steps must be Pipeline steps, not bare expressions. Replace bare test, for example, with echo 'test'; put imperative Groovy in script { ... } only when needed. Validate against your controller's installed DSL using the official linter command (checked 2026-10-20).

ssh -p "$JENKINS_PORT" "$JENKINS_HOST" declarative-linter < Jenkinsfile

Do not disable the sandbox or approve scripts to fix parser errors. Lint success does not establish runtime success.

2. Still waiting to schedule task

That exact line appears in ns-gsa's kubernetes-plugin #2772, alongside an offline generated node and failed image pull (checked 2026-10-20). Node names vary.

Here the pod cannot pull an image; elsewhere labels, executor availability or launcher connectivity can cause the queue wait. Inspect launch logs and, for Kubernetes, the actual pod.

kubectl -n "$NAMESPACE" get pods
kubectl -n "$NAMESPACE" describe pod "$AGENT_POD"
kubectl -n "$NAMESPACE" logs "$AGENT_POD" -c jnlp

Correct the image reference/approved registry access if events identify image pulls; otherwise fix the evidenced label or launcher issue. Retry one job. Do not repeatedly delete pods or increase executors for an image-pull error. See official troubleshooting (checked 2026-10-20).

3. Permission denied in the workspace

The exact suffix Permission denied appears in the official Kubernetes plugin guide (checked 2026-10-20).

The full line starts with a shell file-creation failure and names an agent-specific durable-task log path. That variable path is omitted here; read the linked source for the full observed line.

The guide describes different container UIDs sharing a workspace. Run these checks in each affected container through its Pipeline container step.

id
ls -ld . "${WORKSPACE}@tmp"
test -w "$WORKSPACE"

Align runtime UIDs in the pod template security context and provision workspace ownership for that UID; retry a fresh test workspace. Do not make it world-writable or run every build as root. Docker socket permission failures need a separate diagnosis.

4. Could not find credentials entry

Exact observed line ERROR: Could not find credentials entry with ID 'mysecret' appears in khteh's imported report #482 (checked 2026-10-20). Official lookup code distinguishes a missing ID from a wrong credential kind (checked 2026-10-20).

Check ID rather than description, job-visible store/folder scope and binding type. Regenerate with the job's Snippet Generator. Inside allocated agent steps, this checks an existing username/password entry without printing values.

withCredentials([usernamePassword(credentialsId: 'mysecret',
    usernameVariable: 'REGISTRY_USER', passwordVariable: 'REGISTRY_PASS')]) {
  sh 'set +x; test -n "$REGISTRY_USER" && test -n "$REGISTRY_PASS"'
}

See the binding reference (checked 2026-10-20). Do not echo credentials, interpolate secrets into Groovy strings or widen scope globally. The provider integration in #482 has no verified resolution; an ID edit is not a proven fix for its entire report.

5. Failed to load a plugin

Exact official templates Failed to load: {0} ({1} {2}) and Plugin is missing: {0} ({1}) appear in message definitions (checked 2026-10-20). Braces are substitution slots. Another branch names an Update required dependency floor.

Missing, disabled or too-old dependencies prevent loading. Read the first failure and inventory plugins.

ssh -p "$JENKINS_PORT" "$JENKINS_HOST" list-plugins

If startup fails, inspect startup logs and deployment plugin pins instead. Back up Jenkins home; compare the named dependency/core floor with official plugin metadata. Install/update the compatible set in Manage Jenkins, Plugins, and restart in a maintenance window if required. See Managing Plugins (checked 2026-10-20). Do not delete Jenkins home or blindly force unrelated plugins to latest.

What community reports establish

  • mc-zact, helm-charts #629 reports a startup cascade despite changing pins; its log identifies an outdated dependency. This supports inspecting the first failure, not copying historical versions. See the chart repository.
  • ns-gsa, #2772 supplies queue logs and pod state. A contributor proposed a Reaper change; shipment was not verified. khteh, #482 independently establishes credential-lookup demand. Neither report proves a universal repair.

A prompt to give your agent

Read the linked official source before suggesting a fix; do not guess error strings or versions. Identify the first failure, core/Java/plugin versions, launcher and credential kind without reading secret values. Propose one branch-specific repair and check in a disposable job. Do not modify live controllers, credentials or permissions without a reviewed plan.

Limits

No Jenkins instance, linter, pod, plugin update or credential binding was run. Commands are adaptable examples. Evidence cannot establish the five most frequent errors in 2026; several reports predate 2026. Unverified strings include a universal Agent offline exception and combined permission denied/credentials binding message; neither is asserted as an exact error. Reader-specific node names, plugin versions and provider resolution remain unverified. SSH CLI access must already be configured.

Started from a post by @Xianpeng Shen, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Expected a step; Permission denied: how do I fix Jenkins?
Summary: As of November 2026, Jenkins Pipeline errors need separate fixes for Declarative syntax, agent provisioning, workspace ownership, credential lookup and plugin dependencies. Start with the first matching message; Jenkins LTS 2.580.2 is the official reference baseline, checked 2026-11-15.
Copy for agent
get the whatworks thread jenkins-expected-a-step-offline-permission-credentials-plugin-errors and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread jenkins-expected-a-step-offline-permission-credentials-plugin-errors
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks