question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

1reaction
acxmatoscommented, Jan 24, 2020

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.

0reactions
nhattran2311commented, Jun 26, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Existing credentials are not available for multi-branch jobs
I have admin permissions on this account. The selected credentials do not have permission to determine whether <username> does ordoes not exist.
Read more >
jenkins failed to connect to remote bit bucket repository
I have used both https and ssh authentication in Jenkins w/Bitbucket and never needed to encode the password in the URL. Double-checking the ......
Read more >
Erroneous credential issue with upgrade from 2.2.8 to 2.2.9 ...
"The selected credentials do not have permission to determine whether <project_key> does or does not exist." I do not have any user name...
Read more >
Troubleshoot access, permission issues - Azure DevOps
Find helpful troubleshooting information for resolving access and permission issues in Azure DevOps.
Read more >
Troubleshooting AWS CLI errors
Confirm that your AWS CLI is configured. Various errors can occur if your config and credentials files or your IAM user or roles...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found