Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
Jenkins 2.235.1 on Windows server 2016 x64, Java 1.8.0_144-b01
atlassian-bitbucket-server-integration 1.1.0
Atlassian Bitbucket v7.3.0 on Windows server 2016 x64
-
-
2.1.3
Description
Hi
I try to integrate Jennkins and Bitbucket server with "Bitbucket Server Integration" plugin. I configure personal access token and after pipeline job creation webhook is created in Bitbucket server. Git access is working and status from Jenkins job is presented in Bitbucket server.
The problem that I have is with triggering Jenkins job on git push. I receive this error in Bitbucket WEBhook:
Date: Wed, 24 Jun 2020 07:40:05 GMT Server: Jetty(9.4.27.v20200227) X-Content-Type-Options: nosniff Cache-Control: must-revalidate,no-cache,no-store Content-Type: text/html; charset=ISO-8859-1 Via: 1.1 localhost (Apache-HttpClient/4.5.5 (cache)) Content-Length: 1468 Body <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Error 400 Failed to parse the body: Cannot construct instance of `com.atlassian.bitbucket.jenkins.internal.model.BitbucketUser`, problem: emailAddress at [Source: (org.eclipse.jetty.server.HttpInputOverHTTP); line: 1, column: 311] (through reference chain: com.atlassian.bitbucket.jenkins.internal.trigger.RefsChangedWebhookEvent["actor"])</title> </head>
and this error in Jenkins log:
PM SCHWERWIEGEND com.atlassian.bitbucket.jenkins.internal.trigger.BitbucketWebhookEndpoint parseFailed to parse the body: Cannot construct instance of `com.atlassian.bitbucket.jenkins.internal.model.BitbucketUser`, problem: emailAddress at [Source: (org.eclipse.jetty.server.HttpInputOverHTTP); line: 1, column: 311] (through reference chain: com.atlassian.bitbucket.jenkins.internal.trigger.RefsChangedWebhookEvent["actor"])
Now I realize that I push to Bitbucket server using ssh key assigned to the repository.
In "Push log" I see this:
when push using ssh key:
Pushed by -> Access Key User
when push using user name and password:
pushed by -> Kanchev, Nikolay (my Bitbucket server user)
Perhaps this is the problem - repository assigned keys don't have users connected with them.
In some cases we use repository assigned keys to push changes is there a way to solve this problem?
Best Regards
Nikolay