1975: Git rbssh:bad line length character

Anthony*******@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
March 14, 2011
What version are you running?
1.5.3
0.3.1

What's the URL of the page containing the problem?
N/A

What steps will reproduce the problem?
1. Add a git repository that is SSH backed

What is the expected output? What do you see instead?
I expect the repository to be added, instead the webpage fails with "A repository was not found at the specified path."

What operating system are you using? What browser?
Firefox, Win7

Please provide any additional information below.
The log shows the following error when attempting to add the ssh-backed git repository
2011-02-07 10:21:44,519 - DEBUG - Trying discovered key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx in D:\ReviewBoard\data/.ssh/id_rsa
2011-02-07 10:21:44,551 - DEBUG - userauth is OK
2011-02-07 10:21:45,066 - INFO - Authentication (publickey) successful!
2011-02-07 10:21:45,161 - DEBUG - EOF in transport thread
2011-02-07 10:21:46,707 - ERROR - Git: Failed to find valid repository ssh://joeuser@xxx.xxx.com/some.git: fatal: protocol error: bad line length character

https://git.wiki.kernel.org/index.php/GitFaq#protocol_error:_bad_line_length_character might be helpful in interpreting this error.
chipx86
#1 chipx86
Did you have this problem on 1.5.2?

Our tests should have caught this on Windows, but it may very well depend on whether you're using cygwin git, or something else.

Can you tell me where your git comes from, and whether you're using Cygwin for Python or anything else?
  • +NeedInfo
  • +OpSys-Windows
    +Component-SSH
  • +chipx86
#2 Anthony*******@gmai***** (Google Code) (Is this you? Claim this profile.)
I didn't have this problem on 1.5.2 because on 1.5.2, RB/rbssh would hang after the EOF in transport thread log line

It's a bit tricky for me to answer your question about cygwin or not.  Cygwin is installed but I had installed python as "native" for windows through their redist.  I'm not sure if it's executing in the context of cygwin by default.  I installed git as a package for windows as well.  

In my command prompt when I run which git, which python they reference cygdrive

The bad line length error is followed by a randompool_Deprecation warning which references my python install without cygdrive so I don't think it's running in the context of cygwin.

Is there some logging I can add to rbssh to definitively figure it out?
chipx86
#3 chipx86
Unfortunately, due to the way STDIN/STDOUT piping is handled on Windows (in particular with Python) it is extremely difficult to get 100% right, and likely will depend on where each piece of the puzzle is coming from (cygwin, native installers, etc.) and how things are invoked. It truly is a pain, and I think from here on out we're going to have to push harder for Linux-based installs.

Our new unit tests for this add a repository and check it, and these do pass on Windows, but again, it could be a number of things.

So in theory, you can enable debugging. It's designed to work on a developer install right now, so I'm actually not completely sure where the log file will go (hopefully in data/). We'll need to sort that out down the road.g

You can enable this by setting DEBUG_RBSSH=1 in the environment (probably in your Apache config). It should spit out a rbssh.log file. It'll be going in the current working directory, whichever that is when it's executed. You may have to search around.

Alternatively, you can always edit reviewboard/cmdline/rbssh.py, find "rbssh.log" and give it a custom path for now.
#4 Anthony*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Fair enough.  I am glad that I already switched over to ubuntu but just wanted to provide feedback on 1.5.3 since I still have the windows install available.  With it strongly being recommended to be run on linux you could probably deploy a app VM to help adoption if you haven't already.
david
#5 david
  • -NeedInfo
    +Incomplete