Gerrit ssh host key must be known to jenkins user

Bug #1057477 reported by Antoine "hashar" Musso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zuul
Triaged
High
Unassigned

Bug Description

Having zuul dev running has user jenkins, it choked because the Gerrit server ssh host key was not known:

2012-09-27 11:32:27,387 DEBUG zuul.Repo: Cloning from ssh://jenkins@GERRIT_HOST:29418/mediawiki/core to /var/lib/zuul/git/mediawiki/core
2012-09-27 11:32:27,534 ERROR zuul.Merger: Unable to initialize repo for mediawiki/core
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/zuul-1.0-py2.7.egg/zuul/merger.py", line 105, in addProject
    repo = Repo(url, path)
  File "/usr/local/lib/python2.7/dist-packages/zuul-1.0-py2.7.egg/zuul/merger.py", line 32, in __init__
    self._ensure_cloned()
  File "/usr/local/lib/python2.7/dist-packages/zuul-1.0-py2.7.egg/zuul/merger.py", line 39, in _ensure_cloned
    git.Repo.clone_from(self.remote_url, self.local_path)
  File "/usr/lib/python2.7/dist-packages/git/repo/base.py", line 739, in clone_from
    return cls._clone(Git(os.getcwd()), url, to_path, GitCmdObjectDB, progress, **kwargs)
  File "/usr/lib/python2.7/dist-packages/git/repo/base.py", line 691, in _clone
    finalize_process(proc)
  File "/usr/lib/python2.7/dist-packages/git/remote.py", line 64, in finalize_process
    proc.wait()
  File "/usr/lib/python2.7/dist-packages/git/cmd.py", line 100, in wait
    raise GitCommandError(self.args, status, self.proc.stderr.read())
GitCommandError: 'git clone -v ssh://jenkins@GERRIT_HOST:29418/mediawiki/core /var/lib/zuul/git/mediawiki/core' returned exit status 128: Host key verification failed.
fatal: The remote end hung up unexpectedly

At least the debug message is meaningful :-)

The first action would be to update the documentation. Then maybe zuul-server could get a check command that would validate the config files and attempt one connection to the host to make sure everything will work fine.

Revision history for this message
James E. Blair (corvus) wrote :

We could also probably have it accept the host key if it's unknown on first connection.

Changed in zuul:
status: New → Triaged
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.