Could not read from remote repository (log: Cannot negotiate, proposals do not match)

1,488 views
Skip to first unread message

Blazeflack

unread,
Jul 18, 2017, 4:44:45 AM7/18/17
to SmartGit
Hi.

I'm having some issues using SmartGit to connect to a GitLab server (dedicated server, not GitLab.com).
When using the command line or when using Git-Shell everything works fine. When I use SmartGit I get the "Could not read from remote repository" error.

I'm using Windows 10 64bit, SmartGit 17.0.4 and I'm using the SmartGit SSH client.

The following is what I could find in the log file:

662876 (2017-07-18 07:50:28,050) [QThreadPoolThread-1 (stderr-#13 "C:\Program Files (x86)\SmartGit\git\bin\git.exe" fetch --progress --prune --recurse-submodules=no t)] INFO  smartgit.command.logging  - stderr: fatal: Could not read from remote repository.
662876 (2017-07-18 07:50:28,050) [QThreadPoolThread-1 (stderr-#13 "C:\Program Files (x86)\SmartGit\git\bin\git.exe" fetch --progress --prune --recurse-submodules=no t)] INFO  smartgit.command.logging  - stderr: Please make sure you have the correct access rights
662876 (2017-07-18 07:50:28,050) [QThreadPoolThread-1 (stderr-#13 "C:\Program Files (x86)\SmartGit\git\bin\git.exe" fetch --progress --prune --recurse-submodules=no t)] INFO  smartgit.command.logging  - stderr: and the repository exists.
662887 (2017-07-18 07:50:28,061) [WorkerThread-1] INFO                q.exec  - Executing #14 [D:\Git\ElvUI] "C:\Program Files (x86)\SmartGit\git\bin\git.exe" status --untracked-files=no --porcelain
663006 (2017-07-18 07:50:28,180) [WorkerThread-1] INFO  smartgit.executable.remoteCmd  - Using built-in SSH client
663009 (2017-07-18 07:50:28,183) [WorkerThread-1] INFO                q.exec  - Executing #15 [D:\Git\ElvUI] "C:\Program Files (x86)\SmartGit\git\bin\git.exe" ls-remote origin refs/heads/development*
663195 (2017-07-18 07:50:28,369) [QThreadPoolThread-4 (smartgit.agV)] INFO             sc.server  - Received command 'ssh'
663197 (2017-07-18 07:50:28,371) [QThreadPoolThread-4 (smartgit.agV)] INFO             sc.server  -   params: ssh (id=1456043188706962861)
663525 (2017-07-18 07:50:28,699) [Thread-183] ERROR smartgit.ssh.trilead  - com.trilead.ssh2.transport.KexManager: Cannot negotiate, proposals do not match.
663525 (2017-07-18 07:50:28,699) [Thread-183] ERROR smartgit.ssh.trilead  - com.trilead.ssh2.transport.KexManager: Local : KexParameters{cookie=[-79, -49, 36, 112, 66, -45, -81, -91, 73, -86, -3, -52, 30, -23, 82, -44], kex_algorithms=[diffie-hellman-group-exchange-sha1, diffie-hellman-group14-sha1, diffie-hellman-group1-sha1], server_host_key_algorithms=[ssh-rsa, ssh-dss], encryption_algorithms_client_to_server=[aes256-ctr, aes192-ctr, aes128-ctr, blowfish-ctr, aes256-cbc, aes192-cbc, aes128-cbc, blowfish-cbc, 3des-ctr, 3des-cbc], encryption_algorithms_server_to_client=[aes256-ctr, aes192-ctr, aes128-ctr, blowfish-ctr, aes256-cbc, aes192-cbc, aes128-cbc, blowfish-cbc, 3des-ctr, 3des-cbc], mac_algorithms_client_to_server=[hmac-sha1-96, hmac-sha1, hmac-md5-96, hmac-md5], mac_algorithms_server_to_client=[hmac-sha1-96, hmac-sha1, hmac-md5-96, hmac-md5], compression_algorithms_client_to_server=[none], compression_algorithms_server_to_client=[none], languages_client_to_server=[], languages_server_to_client=[], first_kex_packet_follows=false, reserved_field1=0}
663525 (2017-07-18 07:50:28,699) [Thread-183] ERROR smartgit.ssh.trilead  - com.trilead.ssh2.transport.KexManager: Remote: KexParameters{cookie=[42, 63, 95, 106, -114, -44, 86, 78, -3, -52, 120, -45, 16, 76, 61, -18], kex_algorithms=[diffie-hellman-group-exchange-sha256, diffie-hellman-group14-sha1, diffie-hellman-group-exchange-sha1], server_host_key_algorithms=[ssh-rsa, ssh-ed25519], encryption_algorithms_client_to_server=[aes25...@openssh.com, aes12...@openssh.com, aes256-ctr, aes128-ctr], encryption_algorithms_server_to_client=[aes25...@openssh.com, aes12...@openssh.com, aes256-ctr, aes128-ctr], mac_algorithms_client_to_server=[hmac-sha...@openssh.com, hmac-sha...@openssh.com, umac-1...@openssh.com, hmac-sha2-512, hmac-sha2-256, hmac-ripemd160], mac_algorithms_server_to_client=[hmac-sha...@openssh.com, hmac-sha...@openssh.com, umac-1...@openssh.com, hmac-sha2-512, hmac-sha2-256, hmac-ripemd160], compression_algorithms_client_to_server=[none, zl...@openssh.com], compression_algorithms_server_to_client=[none, zl...@openssh.com], languages_client_to_server=[], languages_server_to_client=[], first_kex_packet_follows=false, reserved_field1=0}
663526 (2017-07-18 07:50:28,700) [Thread-183] ERROR smartgit.ssh.trilead  - com.trilead.ssh2.transport.TransportManager: Receive thread: error in receiveLoop: Cannot negotiate, proposals do not match.
663526 (2017-07-18 07:50:28,700) [QThreadPoolThread-4 (smartgit.agV)] WARN             sc.server  - error processing command
java.io.IOException: There was a problem while connecting to git.tukui.org:22
at com.trilead.ssh2.Connection.connect(Connection.java:817)
at com.syntevo.dvcs.transport.ssh.l.a(SourceFile:269)
at com.syntevo.dvcs.transport.ssh.l.a(SourceFile:115)
at com.syntevo.dvcs.transport.ssh.g.a(SourceFile:125)
at smartgit.aTV.a(SourceFile:47)
at smartgit.agV.a(SourceFile:45)
at smartgit.aby.run(SourceFile:24)
at smartgit.abE.run(SourceFile:66)
Caused by: java.io.IOException: Key exchange was not finished, connection is closed.
at com.trilead.ssh2.transport.KexManager.getOrWaitForConnectionInfo(KexManager.java:92)
at com.trilead.ssh2.transport.TransportManager.getConnectionInfo(TransportManager.java:231)
at com.trilead.ssh2.Connection.connect(Connection.java:769)
... 7 more
Caused by: java.io.IOException: Cannot negotiate, proposals do not match.
at com.trilead.ssh2.transport.KexManager.handleMessage(KexManager.java:417)
at com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:765)
at com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:480)
at java.lang.Thread.run(Thread.java:745)


I would appreciate any help you can offer. Let me know if you need any more information.

Thank you.

syntevo Support

unread,
Jul 18, 2017, 8:28:22 AM7/18/17
to smar...@googlegroups.com
Hi,

The internal SSH client seems not to understand all SSH server key configurations. The recommended work-around is to configure to use System SSH with the help of ~/.ssh/config so the SSH client never asks anything on command line (otherwise SmartGit will hang).

--
Best regards,
Thomas Singer
syntevo GmbH
http://www.syntevo.com
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To post to this group, send email to smar...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/14e772e8-b4ec-4b92-aead-d12019ba7324%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

Blazeflack

unread,
Jul 18, 2017, 12:31:19 PM7/18/17
to SmartGit
Thanks for the information. I will attempt your workaround when I get home.

Just for future reference, is there documentation on what server key configurations are supported by the internal client? Are you planning on expanding support for more configurations types?

Thank you.

syntevo Support

unread,
Jul 18, 2017, 12:43:31 PM7/18/17
to smar...@googlegroups.com
> Just for future reference, is there documentation on what server key
> configurations are supported by the internal client?

The internal SSH client is the Open Source library trilead.

> Are you planning on expanding
> support for more configurations types?

We are waiting for some volunteer - not because we don't want to pay the effort, but because we don't have the experience to fix an SSH client.

--
Best regards,
Thomas Singer
syntevo GmbH
http://www.syntevo.com


> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To post to this group, send email to smar...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/50538094-4fe4-4e2b-a8b8-44bf6064107a%40googlegroups.com.

Blazeflack

unread,
Jul 18, 2017, 4:07:36 PM7/18/17
to SmartGit, smar...@syntevo.com
For anyone else who might stumble upon this from google searching, I wanted to inform you that we found a solution to the issue.

In this specific case the issue was caused by the fact that the sshd_config did not list any of the MACs that SmartGit ssh client supports. We simply added "hmac-sha1" to the MACs line in the sshd_config on the server. This fixed the issue for us.

Here is how I we were able to guess that this was the issue:
In the log file you will see line with "KexParameters" for Local and Remote. I took those configurations and added them in their own separate file. I then separated each option with a new line, so it would be easy to run a diff on the 2 files. After doing that I compared the available options between local and remote, and realized that it was only the "mac_algorithms_client_to_server" and "mac_algorithms_server_to_client" fields which did not have at least one option in common. I simply took one of the options from the local configuration and added it as an available option in the sshd_config file in the MACs line.

syntevo Support

unread,
Jul 19, 2017, 7:29:42 AM7/19/17
to smar...@googlegroups.com
Thank you for documenting this work-around. Much appreciated.

--
Best regards,
Thomas Singer
syntevo GmbH
http://www.syntevo.com


07/18/2017 22:08 - Blazeflack wrote:

> For anyone else who might stumble upon this from google searching, I wanted
> to inform you that we found a solution to the issue.
>
> In this specific case the issue was caused by the fact that the sshd_config
> did not list any of the MACs that SmartGit ssh client supports. We simply
> added "hmac-sha1" to the MACs line in the sshd_config on the server. This
> fixed the issue for us.
>
> *Here is how I we were able to guess that this was the issue:*
> > > smartgit+u...@googlegroups.com <javascript:>.
> > > To post to this group, send email to smar...@googlegroups.com
> > <javascript:>.
> > > To view this discussion on the web visit
> > >
> > https://groups.google.com/d/msgid/smartgit/50538094-4fe4-4e2b-a8b8-44bf6064107a%40googlegroups.com.
> >
> > > For more options, visit https://groups.google.com/d/optout.
> > >
>
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To post to this group, send email to smar...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/375b9438-9446-45a3-acd8-6226e65dc510%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages