-
-
Notifications
You must be signed in to change notification settings - Fork 933
Assertion fails when fetching over SSH if remote box has /etc/issue #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Experiencing the same problem against GitHub. How were you able to determine that |
I caught the exception and saw the /etc/issue in one side of the assertion. Renaming /etc/issue to /etc/issue.bak got rid of the assertion error. |
Did the AssertionError look anything like this? Or is this unique to my situation?
|
Ah my pulls are being happening over HTTPS, I'll look into opening a new issue if they're not related. |
Yeah this is different, this is over SSH. |
Dowstream bug at Wikimedia https://bugzilla.wikimedia.org/show_bug.cgi?id=59991 That assert causes me some error as well. Pasting there in case it is relevant:
Tons of changes are being merged successfully though. I have not managed to reproduce the issue :( |
Had a similar problem where AssertionError would occur unless using LogLevel=QUIET in .ssh/config. Trialling a workaround using a custom GIT_SSH setting: os.environ['GIT_SSH'] = os.path.join(os.path.dirname(__file__), 'quiet_ssh.sh') where quiet_ssh.sh lives in same directory as python code and contains:
|
I am having this very same problem. Relevant pdb output: (Pdb) w
/home-selfnet/danieln/selftest/runner.py(53)<module>()
-> repo.remote().pull()
/usr/local/lib/python2.7/dist-packages/git/remote.py(605)pull()
-> return self._get_fetch_info_from_stderr(proc, progress or RemoteProgress())
> /usr/local/lib/python2.7/dist-packages/git/remote.py(539)_get_fetch_info_from_stderr()
-> assert len(fetch_info_lines) == len(fetch_head_info), "len(%s) != len(%s)" % (fetch_head_info, fetch_info_lines)
(Pdb) p fetch_head_info
["83feaaab69856ab6645bd71d8ec32bbbaaece600\t\tbranch 'master' of git.selfnet.de:noc/selftest\n"]
(Pdb) pp fetch_info_lines
[' __________ _____ ____________',
' / __/ __/ / / __/ |/ / __/_ __/',
' _\\ \\/ _// /__/ _// / _/ / /',
' /___/___/____/_/ /_/|_/___/ /_/',
' some-git-server.selfnet.de',
' Selfnet e.V. 70569 Stuttgart',
' [email protected] www.selfnet.de',
' = [up to date] master -> origin/master']
(Pdb) As you can see, this is simply a banner message being in the way. Thanks for the workaround @mattcallanan |
In branch 0.3, this should already be fixed. You might want to try that one to see if it fixes the problem in that case as well. |
The latest version on pypi contains a fix for this issue. Please leave a comment if it doesn't fix it for you. |
https://github.com/gitpython-developers/GitPython/blob/0.3/git/remote.py#L539
This assertion is failing when I try to run a fetch over SSH on a box that has an /etc/issue, due to the length of the output from the git fetch not being the expected number of lines.
The text was updated successfully, but these errors were encountered: