Tekton "secret X not found" in CI
A ServiceAccount, workspace, or step env references a Secret by name that Tekton cannot find in the run namespace. Depending on where it is referenced, the run fails to start or the pod stays Pending.
What this error means
A run or pod fails with "secret \"git-creds\" not found" or "secrets \"git-creds\" not found" in events.
Tekton
secrets "git-creds" not foundCommon causes
The Secret is not in the run namespace
Secrets are namespaced. A Secret applied to another namespace does not resolve for this run.
A name typo in a ServiceAccount or env ref
The ServiceAccount secrets entry or a secretKeyRef names a Secret that does not exist.
How to fix it
Create the Secret in the run namespace
- Confirm the namespace the run uses.
- Apply or create the Secret there.
- Re-run once the Secret exists.
Terminal
kubectl create secret generic git-creds \
--from-literal=token=$GIT_TOKEN -n ciCorrect the referenced name
Ensure the ServiceAccount and step refs name a Secret that exists in the namespace.
Terminal
kubectl get secret -n ciHow to prevent it
- Apply Secrets into the same namespace as the runs that use them.
- Keep ServiceAccount and env secret names matched to real objects.
- Provision CI secrets as part of namespace setup.
Related guides
Tekton "CreateContainerConfigError" (missing Secret key) in CIFix Tekton "CreateContainerConfigError" in CI - the step pod cannot start because a referenced ConfigMap or S…
Tekton git-clone step "authentication required" in CIFix a Tekton git-clone step failing with "authentication required" in CI - the ServiceAccount has no git-cred…
Tekton "failed to get ServiceAccount" in CIFix Tekton "failed to get ServiceAccount X" in CI - the run names a ServiceAccount that does not exist in its…