| Not sure if it's related to this particular plugin, but I also had issues setting up a multi branch pipeline connected to our on premises Bitbucket Server. In my case, we use a corporate internet proxy to manage Jenkins plugins. For some reason, this proxy was being used by the Bitbucket plugin during the credential validation call, resulting in an invalid authentication (401). I could find the following on Jenkins fine logs, which led me to solve the problem: Jan 23, 2020 5:09:06 PM FINE com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient Using proxy authentication (user=xxx) Jan 23, 2020 5:17:11 PM FINE com.cloudbees.jenkins.plugins.bitbucket.api.credentials.BitbucketUsernamePasswordAuthenticator Add host=http://x.x.x.x:7990 to authCache. As you can see, the BitbucketServerAPIClient class was using the proxy to make an internal call. In the Manage Plugin advanced settings, I just added the Bitbucket Server IP address to the "No Proxy Host" list, and the issue went away. |