wellington-junio / gitblit

Automatically exported from code.google.com/p/gitblit
Apache License 2.0
0 stars 0 forks source link

key exchange failure while cloning with TortoiseGIT #410

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create user
2. add public ssh key (cat id_rsa.pub | ssh -l ... keys add)
3. create repository
4. grant R access to repository for user
5. clone repository with TortoiseGIT

What is the expected output? What do you see instead?

  Expected the clone operation to succeed.

  Instead, got error from TortoiseGitPlink (which is based on Putty) "Server sent disconnect message type 3 (key exchange failed): "Protocol error: expected packet 34, got 30"

What version of the product are you using? On what operating system?

  Gitblit: release 1.5.0

  Server:
    > uname -a
    Linux blabla 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux

    > lsb_release -a
    No LSB modules are available.
    Distributor ID:     Debian
    Description:        Debian GNU/Linux 7.4 (wheezy)
    Release:            7.4
    Codename:           wheezy

  Client:
    Windows 7 Professional, 64-bit, Service Pack 1
    TortoiseGit 1.8.7.0
    git version 1.8.5.2.msysgit.0

Please provide any additional information below.

Issue is probably caused by Apache Mina SSHD:

  https://issues.apache.org/jira/browse/SSHD-296
  Title: "Support SSH_MSG_KEX_DH_GEX_REQUEST_OLD message"
  Summary: "connecting via PuTTY causes: Disconnecting: Protocol error: expected packet 34, got 30"

Gitblit logs:

  2014-04-23 10:43:21 [INFO ] creating ssh session from /192.168.1.50:53347
  2014-04-23 10:43:21 [WARN ] Exception caught
  org.apache.sshd.common.SshException: Protocol error: expected packet 34, got 30
          at org.apache.sshd.server.kex.DHGEX.next(DHGEX.java:99)
          at org.apache.sshd.common.session.AbstractSession.doHandleMessage(AbstractSession.java:390)
          at org.apache.sshd.common.session.AbstractSession.handleMessage(AbstractSession.java:295)
          at org.apache.sshd.common.session.AbstractSession.decode(AbstractSession.java:717)
          at org.apache.sshd.common.session.AbstractSession.messageReceived(AbstractSession.java:277)
          at org.apache.sshd.common.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:54)
          at org.apache.sshd.common.io.nio2.Nio2Session$1.completed(Nio2Session.java:188)
          at org.apache.sshd.common.io.nio2.Nio2Session$1.completed(Nio2Session.java:174)
          at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
          at sun.nio.ch.Invoker.invokeDirect(Invoker.java:145)
          at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:553)
          at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:275)
          at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:296)
          at java.nio.channels.AsynchronousSocketChannel.read(AsynchronousSocketChannel.java:407)
          at org.apache.sshd.common.io.nio2.Nio2Session.startReading(Nio2Session.java:174)
          at org.apache.sshd.common.io.nio2.Nio2Acceptor$AcceptCompletionHandler.completed(Nio2Acceptor.java:130)
          at org.apache.sshd.common.io.nio2.Nio2Acceptor$AcceptCompletionHandler.completed(Nio2Acceptor.java:109)
          at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
          at sun.nio.ch.Invoker$2.run(Invoker.java:206)
          at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:724)
  2014-04-23 10:43:21 [INFO ] closed ssh session from /192.168.1.50:53347

Original issue reported on code.google.com by ralph.e....@gmail.com on 23 Apr 2014 at 9:42

GoogleCodeExporter commented 9 years ago
Excellent detective work.  Looks like Apache snuck in a new SSHD release with a 
fix on April 14.  I released Gitblit 1.5.0 on April 18 - but I didn't notice 
this update.  I'll update the dependency.

Original comment by James.Mo...@gmail.com on 23 Apr 2014 at 12:45

GoogleCodeExporter commented 9 years ago
I've updated the dependency and it unit tests fine.  But I don't use Tortoise 
or Putty/Pageant.  Maybe you can give it a go and see if upstream fixed the 
issue.

Original comment by James.Mo...@gmail.com on 23 Apr 2014 at 2:40

GoogleCodeExporter commented 9 years ago
Yes, sure. But I don't have a Java dev environment installed.

Original comment by ralph.e....@gmail.com on 24 Apr 2014 at 10:36

GoogleCodeExporter commented 9 years ago
I can build it for you if you tell me which one you need.
Or you can build it on your Debian box:

% sudo apt-get install ant openjdk-7-jdk
% git clone https://github.com/gitblit/gitblit.git
% cd gitblit
% ant buildGO

Original comment by James.Mo...@gmail.com on 24 Apr 2014 at 11:27

GoogleCodeExporter commented 9 years ago
Ok, building was trivial. I redeployed and everything is fine. Gitblit is a 
really nice project by the way! Thanks :-)

Original comment by ralph.e....@gmail.com on 24 Apr 2014 at 8:07

GoogleCodeExporter commented 9 years ago
Great news!  Glad to hear it's working.  And thanks for the positive feedback.

Original comment by James.Mo...@gmail.com on 24 Apr 2014 at 8:10

GoogleCodeExporter commented 9 years ago
Fix or change deployed in 1.5.1 release.

Original comment by James.Mo...@gmail.com on 7 May 2014 at 5:48