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

Git client "accept new host key" breaks SSH auth from OpenSSH 7.5 and earlier

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • git-client-plugin
    • None
    • Debian Linux 9.13
      OpenSSH 7.4p1
    • 3.11.2

      After updating jenkins to 2.361 and all plugins to latest versions, jenkins ssh attempts to clone gitlab repository (standard git client) and fails with output:

      Setting origin to git@gitlab.xxxxx:yyyy/project.git
      > git config remote.origin.url git@gitlab.xxxxx:yyyy/project.git # timeout=10
      Fetching origin...
      Fetching upstream changes from origin
      > git --version # timeout=10
      > git --version # 'git version 2.11.0'
      > git config --get remote.origin.url # timeout=10
      using GIT_SSH to set credentials Gitlab Jenkins SSH Key
      Verifying host key using known hosts file, will automatically accept unseen keys
      > git fetch --tags --progress – origin +refs/heads/:refs/remotes/origin/ # timeout=10
      hudson.plugins.git.GitException: Command "git fetch --tags --progress – origin +refs/heads/:refs/remotes/origin/" returned status code 128:
      stdout: 
      stderr: command-line line 0: unsupported option "accept-new".
      fatal: Could not read from remote repository.

       
      Manually executing "ssh -o StrictHostKeyChecking=accept-new gitlab" returns error. Substituting 'accept-new' with 'no' results in no error.

          [JENKINS-69149] Git client "accept new host key" breaks SSH auth from OpenSSH 7.5 and earlier

          Jesse McCormick created issue -
          Jesse McCormick made changes -
          Description Original: After updating jenkins to 2.361 and all plugins to latest versions, jenkins ssh attempts to clone gitlab repository (standard git client) and fails with output:

          {{Setting origin to git@gitlab.xxxxx:yyyy/project.git}}
          {{> git config remote.origin.url git@gitlab.xxxxx:yyyy/project.git # timeout=10}}
          {{Fetching origin...}}
          {{Fetching upstream changes from origin}}
          {{> git --version # timeout=10}}
          {{> git --version # 'git version 2.11.0'}}
          {{> git config --get remote.origin.url # timeout=10}}
          {{using GIT_SSH to set credentials Gitlab Jenkins SSH Key}}
          {{Verifying host key using known hosts file, will automatically accept unseen keys}}
          {{> git fetch --tags --progress -- origin +refs/heads/*:refs/remotes/origin/* # timeout=10}}
          {{hudson.plugins.git.GitException: Command "git fetch --tags --progress -- origin +refs/heads/*:refs/remotes/origin/*" returned status code 128:}}
          {{stdout: }}
          {{stderr: command-line line 0: unsupported option "accept-new".}}
          {{fatal: Could not read from remote repository.}}

           

          {{{}Manually executing "ssh -o StrictHostKeyChecking=accept-new gitlab" returns error. Substituting '{}}}{{{}accept-new{}}}{{{}' with {}}}{{{}'no' results in no error.{}}}{{{}{}}}
          New: After updating jenkins to 2.361 and all plugins to latest versions, jenkins ssh attempts to clone gitlab repository (standard git client) and fails with output:

          {{Setting origin to git@gitlab.xxxxx:yyyy/project.git}}
          {{> git config remote.origin.url git@gitlab.xxxxx:yyyy/project.git # timeout=10}}
          {{Fetching origin...}}
          {{Fetching upstream changes from origin}}
          {{> git --version # timeout=10}}
          {{> git --version # 'git version 2.11.0'}}
          {{> git config --get remote.origin.url # timeout=10}}
          {{using GIT_SSH to set credentials Gitlab Jenkins SSH Key}}
          {{Verifying host key using known hosts file, will automatically accept unseen keys}}
          {{> git fetch --tags --progress – origin +refs/heads/{*}:refs/remotes/origin/{*} # timeout=10}}
          {{hudson.plugins.git.GitException: Command "git fetch --tags --progress – origin +refs/heads/{*}:refs/remotes/origin/{*}" returned status code 128:}}
          {{stdout: }}
          {{stderr: command-line line 0: unsupported option "accept-new".}}
          {{fatal: Could not read from remote repository.}}

           
          Manually executing "ssh -o StrictHostKeyChecking=accept-new gitlab" returns error. Substituting 'accept-new' with 'no' results in no error.
          Jesse McCormick made changes -
          Component/s New: git-client-plugin [ 17423 ]
          Jesse McCormick made changes -
          Resolution New: Won't Fix [ 2 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          Jesse McCormick made changes -
          Comment [ Error on EOL linux version. ]
          Mark Waite made changes -
          Component/s Original: ssh-credentials-plugin [ 17424 ]
          Mark Waite made changes -
          Summary Original: Update to Jenkins and latest plugins break SSH auth from Debian node to gitlab New: Update to Jenkins and latest plugins break SSH auth from Debian 9 to gitlab
          Mark Waite made changes -
          Summary Original: Update to Jenkins and latest plugins break SSH auth from Debian 9 to gitlab New: Git client "accept new host key" breaks SSH auth from Debian 9
          Mark Waite made changes -
          Assignee Original: Matt Sicker [ jvz ]
          Steven Haigh made changes -
          Assignee New: Mark Waite [ markewaite ]
          Resolution Original: Won't Fix [ 2 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]
          Mark Waite made changes -
          Status Original: Reopened [ 4 ] New: Open [ 1 ]

            markewaite Mark Waite
            koan00 Jesse McCormick
            Votes:
            15 Vote for this issue
            Watchers:
            29 Start watching this issue

              Created:
              Updated:
              Resolved: