Error: The token provided is invalid or expired in RHOCP 4

Solution Verified - Updated -

Issue

  • The command oc login --token=<token-string> returns an error regarding invalid/expired token.
  • Token expired or invalid error while running Jenkins pipeline.
  • Builds or Deployments fails due to service-account's token being expired.
error: The token provided is invalid or expired.
  • Extend the access token duration for users / service-accounts .

Environment

  • Red Hat OpenShift Container Platform 4.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content