{"record":{"id":"7f9f632938c17e3b","repo":"jenkinsci/jenkins","slug":"you-must-authenticate-to-access-this-jenkins","errorCode":null,"errorMessage":"You must authenticate to access this Jenkins.\n","messagePattern":"You must authenticate to access this Jenkins\\.\n","errorType":"exception","errorClass":"AccessDeniedException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/hudson/cli/HelpCommand.java","lineNumber":54,"sourceCode":" * Show the list of all commands.\n *\n * @author Kohsuke Kawaguchi\n */\n@Extension\npublic class HelpCommand extends CLICommand {\n\n    @Argument(metaVar = \"COMMAND\", usage = \"Name of the command\")\n    public String command;\n\n    @Override\n    public String getShortDescription() {\n        return Messages.HelpCommand_ShortDescription();\n    }\n\n    @Override\n    protected int run() throws Exception {\n        if (!Jenkins.get().hasPermission(Jenkins.READ)) {\n            throw new AccessDeniedException(\"You must authenticate to access this Jenkins.\\n\"\n                    + CLI.usage());\n        }\n\n        if (command != null)\n            return showCommandDetails();\n\n        showAllCommands();\n\n        return 0;\n    }\n\n    private int showAllCommands() {\n        Map<String, CLICommand> commands = new TreeMap<>();\n        for (CLICommand c : CLICommand.all())\n            commands.put(c.getName(), c);\n\n        for (CLICommand c : commands.values()) {\n            stderr.println(\"  \" + c.getName());","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/jenkinsci/jenkins/blob/2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc/core/src/main/java/hudson/cli/HelpCommand.java#L36-L72","documentation":"Error \"You must authenticate to access this Jenkins.\n\" thrown in jenkinsci/jenkins.","triggerScenarios":"Raised when an unauthenticated user runs a CLI command against a Jenkins instance that requires authentication. Provide credentials via -auth, SSH key, or API token.","commonSituations":"See trigger scenarios.","solutions":["Authenticate using -auth user:apitoken or -username/-password options.","Create an API token under your Jenkins user configuration page.","Verify your credentials have Overall/Read permission."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc","analyzedAt":"2026-08-14T07:07:15.274Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}