• Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • git-plugin
    • Jenkins Master version - 2.462.1 LTS
      Git plugin Version - 5.3.0
      Job Type - Pipeline

      Problem Description:-

       * I have configured a Pipeline job. In the Pipeline definition section, I selected "Pipeline script from SCM{*}." However, I'm encountering the following error.

      Console Output:

       

      Started by user Admin

      hudson.plugins.git.GitException: Command "git fetch --tags --force --progress --prune – origin +refs/heads/main:refs/remotes/origin/main" returned status code 128:

      stdout:

      stderr: Host key verification failed.

      fatal: Could not read from remote repository.

       

      Please make sure you have the correct access rights

      and the repository exists.

       

                     at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2846)

                     at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2185)

                     at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:635)

                     at PluginClassLoader for git//jenkins.plugins.git.GitSCMFileSystem$BuilderImpl.build(GitSCMFileSystem.java:406)

                     at PluginClassLoader for scm-api//jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:219)

                     at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:126)

                     at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:73)

                     at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)

                     at hudson.model.ResourceController.execute(ResourceController.java:101)

                     at hudson.model.Executor.run(Executor.java:446)

      Finished: FAILURE

       

      I suspect there might be an issue with the plugin side, but I'm not entirely sure. Could you please assist me in resolving this?

          [JENKINS-73603] Pipeline script from SCM - Git Issue

          Mark Waite added a comment - - edited

          Please refer to the git client plugin documentation for the options that are available to resolve that message. If you're using an operating system that is supported by Jenkins (not Red Hat Enterprise Linux 7 and not one of its derivatives like CentOS Linux 7), then you can enable "Accept first connection" as the remote host key verification strategy in your Jenkins configuration.

          If that is not secure enough, then you can configure the approved host keys using the entry for github.com that is in the git client plugin documentation.

          Mark Waite added a comment - - edited Please refer to the git client plugin documentation for the options that are available to resolve that message. If you're using an operating system that is supported by Jenkins (not Red Hat Enterprise Linux 7 and not one of its derivatives like CentOS Linux 7), then you can enable "Accept first connection" as the remote host key verification strategy in your Jenkins configuration. If that is not secure enough, then you can configure the approved host keys using the entry for github.com that is in the git client plugin documentation .

          Mohan added a comment -

          I have updated the "Configure the host key verification strategy from "Manage Jenkins" >> "Security" >> "Git Host Key Verification Configuration", now working as expected. Thanks.

          Mohan added a comment - I have updated the "Configure the host key verification strategy from "Manage Jenkins" >> "Security" >> "Git Host Key Verification Configuration", now working as expected. Thanks.

            markewaite Mark Waite
            smohan08 Mohan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: