Reputation: 34
The problem is: the build is not triggered after the code is submitted
I have a "Freestyle project" Jenkins job that has set GitHub hook trigger for GITScm polling。
The system settings of Jenkins are configured with github server and the test connection is successful。
github-> webhook also shows that the message was sent successfully
But after submitting the code to github, no build was triggered. The github hook log of the job showed “FATAL: hudson.plugins.git.GitException: Command "/usr/bin/git ls-remote -h [email protected]:yuwan1994/jenkinsdemo. git" returned status code 128: stdout: stderr: Host key verification failed. fatal: Could not read from remote repository.” github hook log
I tried to connect to the server and executed the command "/usr/bin/git ls-remote -h [email protected]:yuwan1994/jenkinsdemo.git", but the final revised version was returned, but the final version and github hook log showed Different versions. The server display is correct
Software versions:
Jenkins - 2.319.1 GitHub plugin - 1.34.1 Server System - Centos7 Server Git - 1.8.3.1
Upvotes: 0
Views: 1784
Reputation: 34
Job->Configure->Source Code Management->Git->Repository URL need to use web url, don't use ssh url. Then choose jenkins credentials. If there is no link error, the link is normal.
Upvotes: 0