Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When using GIT, I have problems with using GIT over SSH, and since it works just fine both from work, and at home with a different modem, it's obviously my home modem that is acting up. I have no problems connecting over HTTP.

So, I'm assuming it is an SSH problem, but I'm no expert at using it directly. Is there any command I can run which sets up a "test" connection, and lets me know exactly when and where along the line the problem occurs?

Pretty much all "larger" commands (such as fetch, clone, or push with much data) from git (even when run with -v) just "hang" in the middle of connecting remotely with no indication as to why they have stopped, so they are of no use.

Is there any way I can get more details on what is happening in the SSH connection?

share|improve this question
add comment

1 Answer 1

Per man ssh:

 -v      Verbose mode.  Causes ssh to print debugging messages about its progress.  This
         is helpful in debugging connection, authentication, and configuration problems.
         Multiple -v options increase the verbosity.  The maximum is 3.

So, try ssh -v. If that doesn't tell you what you need to know, you can add one or two vs for even more detailed debugging information. For Github in particular, try ssh -vvvT git@github.com.

Usually, in my experience, an SSH session hanging during setup happens when the client can't complete the chosen authentication method. Check that your private key is in the right place with the right permissions and matches the public key you've given Github.

share|improve this answer
    
Thanks for the answer, but I should probably have asked the question differently (since GitHub doesn't allow direct SSH connections like that). I edited the post and title, but is it better to discard this one and create a new question instead? –  IQAndreas Sep 12 '13 at 21:52
    
@IQAndreas, GitHub does allow SSH connections like that in the sense that the authentication phase will be carried out and if the problem is indeed happening in the SSH step, you'll see it that way. If you're finding that you can't even get that far, something is going on that's preventing the connection from even being made. –  tgies Sep 13 '13 at 10:01
1  
I'm being authenticated just fine, and sometimes push/pull on the repo with no problems. But often it just "hangs" in the middle of the command and won't continue (especially when I transfer large amounts of data such as a large clone or push). There are no error messages, it just sits there and doesn't continue. –  IQAndreas Sep 13 '13 at 20:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.