gitpython-developers/GitPython — Issue #48: Traceback when ssh VisualHostKey is used
Author: j2sol
Created: 2012-03-02 23:34:20+00:00
State: open

https://bugzilla.redhat.com/show_bug.cgi?id=773640 is where this bug came in.

Description of problem:
If you have VisualHostKey turned on in .ssh/config and you try to access a git
repo via ssh in GitPython, GitPython will fail.

Version-Release number of selected component (if applicable):
GitPython-0.3.2-0.1.RC1.fc14.noarch
(Rebuilt from the current sources in master)

How reproducible:
Everytime

Steps to Reproduce:
1. echo 'VisualHostKey yes' >> ~/.ssh/config
1. git clone ssh://git.fedorahosted.org/git/fas
1. python
2. import git
3. repo = git.Repo('fas')
4. repo.remotes.origin.fetch()

Actual results:
Traceback (most recent call last):
File "", line 1, in
repo.remotes.origin.fetch()
File "/usr/lib/python2.7/site-packages/git/remote.py", line 593, in fetch
return self._get_fetch_info_from_stderr(proc, progress or RemoteProgress())
File "/usr/lib/python2.7/site-packages/git/remote.py", line 539, in
_get_fetch_info_from_stderr
assert len(fetch_info_lines) == len(fetch_head_info), "len(%s) != len(%s)"
% (fetch_head_info, fetch_info_lines)
AssertionError: len(["0fd7e783141916845432f94d8ee7c2e8a34c02f9\t\tbranch
'master' of ssh://fedorapeople.org/~toshio/public_git/gitsync\n"]) !=
len(['Host key fingerprint is 07:d4:02:db:9f:70:d5:2d:7f:1b:6a:df:83:73:95:1d',
'+--[ RSA 2048]----+', '| .... .. . |', '| +. .. o .|', '| .
+.. o |', '| = . Eo|', '| S + . B|', '| . o
oo|', '| . o o|', '| o +.|', '| o .|',
'+-----------------+', '', '', ' = [up to date] master ->
origin/master'])

Expected results:
The remote repository is fetched