- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 934
Remote operations fail with 'Failed to parse line' when ssh Banner exists? #781
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
Thanks for letting us know! |
I’ll give it a crack..
Steffen Schumacher
+45 30662747
… Den 15. jul. 2018 kl. 15.31 skrev Sebastian Thiel ***@***.***>:
Thanks for letting us know!
Maybe there are better ways to solve it, but I would already be happy for a PR along the lines of what you are showing here.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Is there any update on this? The changes above didn't fix my problem |
There is probably a better way of doing this however this is how I managed to get it to work: for line in progress.other_lines:
line = force_text(line)
if re.match(r'^[^\nA-Za-z]+', line):
continue
for cmd in cmds:
if len(line) > 1 and line[0] == ' ' and line[1] == cmd:
fetch_info_lines.append(line)
print(line)
print("continue")
continue Happy to put this in as a PR if people are happy with it. |
I have tried the suggested regex, but it looks like it breaks a test:
Probably the regular expression is too greedy after all :(. |
Hi,
I'm hitting the below line in git/remote.py:
Seemingly because my git(-lab) server has an SSH banner like this:
From what I can tell, then the issue is (also in remote.py) in class Remote._get_fetch_info_from_stderr():
where cmd contains ' ' (single whitespace), which will match the very first line, which is clearly not git output.
I know the easy fix is to remove the SSH banner, but it should be relatively easy to improve the matching on valid cmd lines I'd expect?
In my own env, I did a quick fix like so:
Probably there are better ways of fixing this?
The text was updated successfully, but these errors were encountered: