"The selected credentials do not have permissions to determine whether project does or does not exist" error
See original GitHub issue- Jenkins v.2.190.2
- Bitbucket Branch Source plugin v2.6.0
- Bitbucket Server v5.16.3
Description
I am trying to configure Bitbucket’s native webhooks to trigger a Jenkins Multibranch Pipeline job scan. Under the job’s configuration (Branch Sources
-> Bitbucket
-> Owner
), I entered the project key associated with the repository I would like to trigger a Multibranch Pipeline scan on.
On save, I get the error “The selected credentials do not have permissions to determine whether [project key I specified] does or does not exist”.
When I try to Scan Multibranch Pipeline Now
anyway, a tooltip instantly pops up saying “Done.”. The scan does not occur. Under logs, I see Could not update folder level actions from source
and Failed to recompute children of [project key I specified]
errors.
The errors persist after I delete and recreate the job. The credentials I specified in the job’s configuration have write access to the associated repository.
Is this plugin intended to work only with Bitbucket Cloud?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5
Top GitHub Comments
Just for anyone wondering around this problem just like I was. 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.
thank you very much, I spent a lot of time on this problem.