Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Pipeline script from SCM - Git Issue

39 views
Skip to first unread message

Mk

unread,
Aug 12, 2024, 5:14:19 AM8/12/24
to Jenkins Users

Hi Team,

 

My Environment:-

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.

 

SCM: Git

Repository URL:  g...@github.com:testorg/test-abc.git

 

Failed to connect to repository : Command "git ls-remote -h -- g...@github.com:testorg/test-abc.git HEAD" 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.

Script Path: Jenkinsfile

 

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?

 

Mk

unread,
Aug 12, 2024, 6:25:37 AM8/12/24
to Jenkins Users
I have updated the "Configure the host key verification strategy from "Manage Jenkins" >> "Security" >> "Git Host Key Verification Configuration", now working as expected. Thanks.

Reply all
Reply to author
Forward
0 new messages