Could not find credentials entry CI/CD Origin: Build & delivery Last updated 25 Oct 2026

Jenkins: ERROR: Could not find credentials entry with ID 'github-token'

The Jenkinsfile references a credentials ID that does not exist in the scope Jenkins can see for this job.

Exact message you may see Could not find credentials entry with IDERROR: Could not find credentials entry with IDCredentials not found withCredentials Jenkins
Seen on: Jenkins

Meaning

Credentials live in a store and scope (system, global, folder). A job inside a folder can use global credentials and its folder's own, not a sibling folder's. IDs are case-sensitive and must match exactly; type matters too (secret text vs username/password).

Common causes

  • ID misspelled or never created
  • Credentials stored in a folder/store not visible to this job
  • Wrong credential type for the binding
  • Credentials deleted or renamed
  • Multibranch scan using a different folder scope

⚡ Quick fix

  1. Compare the ID in Manage Jenkins → Credentials
  2. Create it in a scope visible to the job (global or the job's folder)
  3. Match the type used by withCredentials

Detailed fix by platform

Jenkins

  1. withCredentials([string(credentialsId: 'github-token', variable: 'TOKEN')]) { sh 'curl -H "Authorization: Bearer $TOKEN" ...' }

Code examples

Use credentials safely

groovy
withCredentials([usernamePassword(credentialsId: 'registry', usernameVariable: 'U', passwordVariable: 'P')]) {
  sh 'echo "$P" | docker login -u "$U" --password-stdin registry.example.com'
}

How to diagnose

  1. ID — Exact credentialsId?
  2. Scope — Visible to this job?
  3. Type — Matches the binding?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Build & delivery. Errors that are often confused with or caused by this one (click to open):

Cannot perform an interactive login from a non TTY device — GitHub Actions: Error: Cannot perform an interactive login from a non TTY device (CI/CD)Cannot perform an int…Input required and not supplied — GitHub Actions: Error: Input required and not supplied: token (CI/CD)Input required and no…No such DSL method — Jenkins: java.lang.NoSuchMethodError: No such DSL method 'dockerBuild' found among steps (CI/CD)No such DSL methodpermission denied /var/run/docker.sock — Jenkins: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock (CI/CD)permission denied /va…Scripts not permitted to use method — Jenkins: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method java.lang.String toUpperCase (CI/CD)Scripts not permitted…Waiting for next available executor — Jenkins: Still waiting to schedule task — Waiting for next available executor / 'agent1' is offline (CI/CD)Waiting for next avai…WorkflowScript compilation error — Jenkins: WorkflowScript: 12: unexpected token: } @ line 12, column 5. 1 error (CI/CD)WorkflowScript compil…Could not…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.