Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41166

Error shown in job configuration when master has no git installation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • Jenkins ver 2.7.4
      Git client plugin 2.0.0
      Git plugin 3.0.0

      In a installation when the Jenkins master has no executors and no git installed and only the slave/s have both executors and git installed, the following error is shown in the job configuration:

      Failed to connect to repository : Error performing command: git ls-remote -h ssh://git@<git_server> <git_repository> HEAD

      Jenkins configurations where master has no executors are one best practice (https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Best+Practices), I quote:

      In larger systems, don't build on the master.

      If you have a more complex security setup that allows some users to only configure jobs, but not administer Jenkins, you need to prevent them from running builds on the master node, otherwise they have unrestricted access into the JENKINS_HOME directory. You can do this by setting the executor count to zero. Instead, make sure all jobs run on slaves. This ensures that the jenkins master can scale to support many more jobs, and it also protects builds from modifying potentially sensitive data on $JENKINS_HOME accidentally/maliciously. If you need some jobs to run on the master (e.g. backups of Jenkins itself), use the Job Restrictions Plugin to limit which jobs can be executed there.

      Therefore, this error should not appear when the number of executors in the master is 0 as it is irrelevant that the Jenkins master "has/has not" git installed and or access to the git repository server/s. Plugin should consider the case when git is only installed in the slaves.

      Thanks in advance!

            Unassigned Unassigned
            javierfdez Javier Fernandez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: