I'm running Klocwork analysis with Jenkins on a windows server 2019. Jenkins : 2.235.1 Klocwork Analysis Plug-in : 2020.3.
when the job is executing klockwork command (kwbuildproject, kwdeploy), there is authentication error :
Authentication failed. Please run the "C:\Klocwork\Server 18.2\bin\kwauth.exe --url https://<my-URL>/" command to login.
Of course, I ran kwauth.exe, and the klockwork commands run fine from command line on server. The problem is that when run by the plugin, the authentication fails (or no credential provided - it's not visible in log)
I tried to use explicit ltoken configuration, and it's detected by the plugin
Detected ltoken file. Setting KLOCWORK_LTOKEN to "C:\Users\<my-USER>\.klocwork\ltoken"
But still, same authentication error.
On an older Jenkins (Plugin Klocwork Analysis 1.18), the authentication works using same ltoken file.
Do I miss something in the configuration of Klocwork plugin ?
Are you running the Klocwork analysis from the command line as X user and trying to run the Jenkins Job as Y user? if yes, you should authenticate the Y user as well through kwauth. Y user should have access to perform Klocwork analysis (Roles). Please Make sure the ltoken file can be accessed by Jenkins.