Interview Prep/Jenkins/Credentials, permissions & script approval

Agents fail to connect with `Rejected connection: ... is not authorized to connect` or the agent secret error `Incorrect secret`

IntermediateTroubleshootingCredentials, permissions & script approval
Answer

Likely causes → The node was deleted and recreated (new secret), the agent uses a stale secret, or the node name differs from -name.

Diagnose → Compare the node name and secret on the node's page with the agent's start command.

Fix → Update the agent with the current secret and exact name; restart the agent.

Prevent → Store agent secrets in a secret store and automate agent registration.

All Jenkins questions Roadmap: Jenkins

More on Credentials, permissions & script approval