Jenkins BitBucket integration broke suddenly - jenkins

I have an onpremise Jenkins server setup with Blue Ocean. This is connecting to a BitBbucket cloud account. I haven't done any builds in a couple of months and when I went to Jenkins today it couldn't build any builds and the Scan Mutltibranch pipeline was failing as well.
Error is:
com.cloudbees.jenkins.plugins.bitbucket.api.BitbucketRequestException: HTTP request error. Status: 403: Forbidden.
{"type": "error", "error": {"message": "To make a call, you need to use an app password."}}
I've tried using an app password and my BitBucket user password and neither are working. When I try to create a new pipeline with either of these passwords I just get an "Invalid username and/or password" error.
I'm not sure if anything has changed with Jenkins (or a plugin) or with BitBucket.

Disabling 2 Factor Authentication has fixed the problem. I'm not sure why this was ok before and not now.

Related

AzureDevops webhook to jenkins fails on unauthorized access

Recently i've updated jenkins to build 2.346.3 .
Since then Azure Devops webhook configured for triggering a build by the trigger "code push" fails with the following output:
Failed Sent at: Wednesday, October 26, 2022 10:52:13 AM Message Jamal Hartnett pushed updates to Fabrikam-Fiber-Git:master. Error Message Unauthorized (401)
I've tried to reach microsoft support to solve this..... the savior will not come from their side...
I am using a multibranch pipeline in jenkins.
The token is valid... as far as i see from the documents in jenkins their instructions is to use the "token" parameter in the URL but i don't see any "token" parameter in the URL azure devops sending the webhook to.
Any suggestions? .
I've tried to create new tokens , using CURL to see if the webhook works following the instructions in jenkins documentions which was succesfully performed without any error.
I had this same issue. The fix is to update the server setting in the hook configuration in AZDO from https://build.company.com to https://build.company.com/?token=<USERTOKEN>.
The user token is one generated in a Jenkins user's profile section.

gitlab plugin test connection issue on jenkins

Im having issue with gitlab plugin test connection on jenkins. it gives error when I hit the "test connection" button with the given values.
GitLab user is maintainer and has full access on it. GitLab API token belongs to this user.
unfortunately it seems no way to track this error. I checked the logs files in jenkins machine as well.
GitLab Plugin Version is -> 1.5.27
you may see screenshot of the page here
alternative link:
https://gyazo.com/2b81c4310c7a144651fda54c6b1462c1

Bitbucket Webhook is not triggering Jenkins job even webhook returns 200

I am using bitbucket cloud and jenkins is running on ec2 instance on the private network.
Connection is well established between bitbucket and jenkins as when i run the job manually, the job shows the green status. However when i made the changes in the repo and it gets merged the webhook is not using my app password and as a result the job is getting failed.
I am getting authentication failed and It's basically asking me to use the app password. I have already created it but still webhook is not using it. I am getting the response 200 now in webhook means my webhook is able to reach the jenkins server but i am not sure why i am getting authentication failed.
Can you confirm that:
Your credentials are correctly placed under the credentials section of Jenkins. The username should be the username of the account you are using, and the password should be the app password. It should be present like this:
The ID of the credentials should be used within your pipeline script anywhere you want access to the Bitbucket repository.
Ensure that Bitbucket has access to your EC2 instance that runs Jenkins.
Basically, these are the 3 points where authentication can fail. Checking each point should reveal the problem.

Webhook Test fails during jenkins Gitlab integration

I am trying to integrate jenkins with Gitlab for CI such that if push event is happens then build will be triggered. I am using two things to connect. One is Gitlab acess token: I have created project specific access token and added in Jenkins global configuration. Second is SSH primary key: I have added this in my job configuration. Now when I test the webhook I get below error. Can any leads help me to fix it?
Hook executed successfully but returned HTTP 500 <head resURL="/static/861bc558" data-rooturl=""
I will attach full error if needed

Cannot create Pipiline in BlueOcean, it got stuck on connection to Bitbucket stage with no errors

I am trying to create pipeline via BlueOcean, however creation got stuck at the connection stage despite there is no error on connection.
After choosing "Where is your Bitbucket Server?" and
Putting credentials to "Connect to Bitbucket"
Pressing button "connect" see icon that it progressing for a second, but it do not progress to next step.
No error messages. Credentials are definitely correct, I had tested with wrong credentials and saw "Invalid username and/or password"
Details for Bitbucket and Jenkins
I have admin rights in both Bitbucket and Jenkins
Bitbucket
Installed v5.8.0 for testing new version on my desktop http://pc_name.company.com:7990
It seems working ok, I can add users, create repo, clone repo in jenkins
Jenkins
ver. 2.89.3 as well installed at the same PC, working ok as well
Installed Blueocean plugin 1.4.2
Screenshot attached link to screenshoot
I was stuck in a similar situation. I'm selecting "Bitbucket Cloud" as the selected repository.
I resolved my issue by giving full access to "Generate Password" option in my Bitbucket - in case it helps someone else

Resources