Plugins bitbucket pullrequest builder git rev parse^{commit}返回状态代码128

Plugins bitbucket pullrequest builder git rev parse^{commit}返回状态代码128,plugins,request,bitbucket,builder,pull,Plugins,Request,Bitbucket,Builder,Pull,这是jenkins管道中的一个问题,当我使用bitbucket pullrequest builder插件对创建的pull请求进行触发时,出现了一个问题 <a href="https://bitbucket.org/pilipa/uaa/pull-request/22">#22 Liucl2</a> Obtained pullrequest/uaa.Jenkinsfile from git git@bitbucket.org:pilipa/ci-pipeline.git

这是jenkins管道中的一个问题,当我使用bitbucket pullrequest builder插件对创建的pull请求进行触发时,出现了一个问题

<a href="https://bitbucket.org/pilipa/uaa/pull-request/22">#22 Liucl2</a>
Obtained pullrequest/uaa.Jenkinsfile from git git@bitbucket.org:pilipa/ci-pipeline.git
[Pipeline] node
Running on pilipa-build-server in /home/jenkins/jenkins_home/workspace/MicroserviceCI/LiuclUAAPipelineBuild
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.pipeline.url git@bitbucket.org:pilipa/ci-pipeline.git # timeout=10
Fetching upstream changes from git@bitbucket.org:pilipa/ci-pipeline.git
 > git --version # timeout=10
using GIT_SSH to set credentials pilipa-ci@jenkins for bitbucket
 > git fetch --tags --progress git@bitbucket.org:pilipa/ci-pipeline.git +refs/heads/*:refs/remotes/pipeline/*
 > git rev-parse 8b173b71e025^{commit} # timeout=10
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] stage
[Pipeline] { (Declarative: Post Actions)
[Pipeline] script
[Pipeline] {
[Pipeline] emailext
messageContentType = text/plain; charset=UTF-8
Request made to attach build log
Adding recipients from project recipient list
Adding liucl with address liucl@i-counting.cn
Adding recipients from trigger recipient list
Setting In-Reply-To since last build was not successful
Successfully created MimeMessage
Executing pre-send script
Pre-send script set cancel to false

Sending email to: zhumx@i-counting.cn liucl@i-counting.cn
MessagingException message: 526 Authentication failure[0]

[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] End of Pipeline
hudson.plugins.git.GitException: Command "git rev-parse 8b173b71e025^{commit}" returned status code 128:
stdout: 8b173b71e025^{commit}

stderr: fatal: ambiguous argument '8b173b71e025^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1970)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1938)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1934)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1572)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1584)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:769)
    at hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)
    at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:896)
    at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:870)
    at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:829)
    at hudson.remoting.UserRequest.perform(UserRequest.java:208)
    at hudson.remoting.UserRequest.perform(UserRequest.java:54)
    at hudson.remoting.Request$2.run(Request.java:360)
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    at ......remote call to pilipa-build-server(Native Method)
    at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1654)
    at hudson.remoting.UserResponse.retrieve(UserRequest.java:311)
    at hudson.remoting.Channel.call(Channel.java:905)
    at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:257)
    at com.sun.proxy.$Proxy74.revParse(Unknown Source)
    at org.jenkinsci.plugins.gitclient.RemoteGitImpl.revParse(RemoteGitImpl.java:558)
    at hudson.plugins.git.RevisionParameterAction.toRevision(RevisionParameterAction.java:98)
    at hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:1007)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1124)
    at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113)
    at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:85)
    at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:75)
    at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
    at hudson.security.ACL.impersonate(ACL.java:260)
    at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Finished: FAILURE


我猜每一个git事件都是由提交部分造成的,有人可以解决这个问题吗?

你解决了吗?
pipeline {
    agent { label 'build-server' }
    triggers{
        bitbucketpr(projectPath:'git@bitbucket.org:${repositoryOwner}/${repositoryName}.git',
        cron:'*/1 * * * *',
        credentialsId:'',
        username:'******',
        password:'******',
        repositoryOwner:'pilipa',
        repositoryName:'uaa',
        branchesFilter:'',
        branchesFilterBySCMIncludes:true,
        ciKey:'ci@pilipa.cn',
        ciName:'Jenkins@pilipa',
        ciSkipPhrases:'',
        checkDestinationCommit:false,
        approveIfSuccess:true,
        cancelOutdatedJobs:true,
        commentTrigger:'test this please')
    }
    options {
        buildDiscarder(logRotator(numToKeepStr: '30', daysToKeepStr: '30'))
        timeout(time: 30, unit: 'MINUTES')
        disableConcurrentBuilds()
        timestamps()
    }
    stages {
        stage('Initialization') {
            steps {
                script {
                    echo "init..."
                    env.imageName = "pilipa/authentication-server"
                    env.tagId = "${BUILD_ID}"
                }
            }
        }
        stage('scm') {
            steps {
                script {
                    echo "scm..."
                    checkout([$class: 'GitSCM', branches: [[name: '*/${sourceBranch}']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '6b9ea1b1-b08b-4153-bc75-90e0d5750e48', name: '${repositoryName}', url: 'git@bitbucket.org:${repositoryOwner}/${repositoryName}.git']]])
                }
            }
        }

        stage('build') {
            steps {
                echo 'build...'
                script {
                    def workspace = pwd()
                    sh "docker run -v $HOME/pipeline/.gradle:/home/gradle/.gradle --memory 2G \
                    -v $workspace:/src --workdir=/src --user root  --tty --rm \
                    gradle:4.2-jdk8 gradle --no-daemon clean build -x test"
                }
            }   
        }

        stage('test'){
            steps {
                echo 'testing...'
                script {
                    try{
                        def workspace = pwd()
                        sh "docker run -v $HOME/pipeline/.gradle:/home/gradle/.gradle --memory 2G \
                        -v $workspace:/src --workdir=/src --user root  --tty --rm gradle:4.2-jdk8 \
                        gradle --no-daemon test"
                    }catch(err){
                        currentBuild.result = 'FAILED'
                        throw err
                    }finally {
                        junit 'build/test-results/**/*.xml'
                    }
                }
            }
        }

    }
    post {
        always {
            script {
                if (currentBuild.resultIsWorseOrEqualTo('UNSTABLE')) {
                    emailext attachLog: true, body: '$DEFAULT_CONTENT', 
                        postsendScript: '$DEFAULT_POSTSEND_SCRIPT', 
                        presendScript: '$DEFAULT_PRESEND_SCRIPT', 
                        recipientProviders: [[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']], 
                            replyTo: '$DEFAULT_REPLYTO', subject: '$DEFAULT_SUBJECT', to: '$DEFAULT_RECIPIENTS'
                }
            }
        }
    }
}