Smartgit keep popup the login form all the time

2.6k views Asked by At

Smartgit keep popup the login form all the time!

I have deployed git on my server. Follow exactly the instruction of git setting.

Then I generate open SSH private key by puttygen, fill the passpharse, put the code inside "public key...authorized_keys file:" box to notepad ++.

After that, I copied the key and put to authorized_keys file "git/.ssh/authorized_keys" and remove all endline character in it.

Then I clone repository via "ssh://git@mygitserver:myport/myproject.git", point to open SSH private key generated before, fill the passphrase and login.

I have googled alot and try to change owner to git user, change permission, edit key file but still hopeless.

Smartgit keep popup the login form all the time. How can I fix it?

I cannot connect to repository using SmartGit, neither command line. This is my log content: `

19143347 (2013-09-07 13:24:00,907) [QThreadPoolThread-2 (smartgit.aES)] WARN  smartgit.ssh.client.ui  - could not authenticate, trying again
java.io.IOException: Publickey authentication failed.
    at com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:314)
    at com.trilead.ssh2.Connection.authenticateWithPublicKey(Connection.java:466)
    at com.trilead.ssh2.Connection.authenticateWithPublicKey(Connection.java:519)
    at com.syntevo.dvcs.transport.ssh.f.a(SourceFile:39)
    at com.syntevo.dvcs.transport.ssh.m.a(SourceFile:150)
    at com.syntevo.dvcs.transport.ssh.h.a(SourceFile:141)
    at smartgit.aES.a(SourceFile:61)
    at smartgit.UL.run(SourceFile:24)
    at smartgit.UQ.run(SourceFile:65)
Caused by: java.io.IOException: Sorry, this connection is closed.
    at com.trilead.ssh2.transport.TransportManager.sendMessage(TransportManager.java:647)
    at com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:282)
    ... 8 more
Caused by: java.io.IOException: Cannot read full block, EOF reached.
    at com.trilead.ssh2.crypto.cipher.CipherInputStream.getBlock(CipherInputStream.java:81)
    at com.trilead.ssh2.crypto.cipher.CipherInputStream.read(CipherInputStream.java:108)
    at com.trilead.ssh2.transport.TransportConnection.receiveMessage(TransportConnection.java:232)
    at com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:681)
    at com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:480)
    at java.lang.Thread.run(Unknown Source)
19144230 (2013-09-07 13:24:01,790) [QThreadPoolThread-2 (smartgit.aES)] WARN  smartgit.ssh.client.ui  - could not authenticate, trying again
java.io.IOException: pubkey authentication failed
    at com.syntevo.dvcs.transport.ssh.f.a(SourceFile:40)
    at com.syntevo.dvcs.transport.ssh.m.a(SourceFile:150)
    at com.syntevo.dvcs.transport.ssh.h.a(SourceFile:141)
    at smartgit.aES.a(SourceFile:61)
    at smartgit.UL.run(SourceFile:24)
    at smartgit.UQ.run(SourceFile:65)
19144231 (2013-09-07 13:24:01,791) [Thread-163] ERROR smartgit.ssh.trilead  - com.trilead.ssh2.transport.TransportManager: Receive thread: error in receiveLoop: socket closed
19144841 (2013-09-07 13:24:02,401) [main] INFO              q.dialog  - Showing dialog 75 (@1E95534) '@1D8EDCE - SSH Authentication' (owner: @520C83)
19144859 (2013-09-07 13:24:02,419) [main] INFO  q.swt.shellActivation  - shell deactivated Shell {Clone}@520C83
19144860 (2013-09-07 13:24:02,420) [main] INFO  q.swt.shellActivation  - shell activated Shell {SSH Authentication}@1E95534
19144860 (2013-09-07 13:24:02,420) [main] INFO  q.swt.shellActivation  - Activation change from Shell {Clone}@520C83 to Shell {SSH Authentication}@1E95534
19146675 (2013-09-07 13:24:04,235) [main] INFO  q.swt.shellActivation  - shell deactivated Shell {SSH Authentication}@1E95534
19146677 (2013-09-07 13:24:04,237) [main] INFO  q.swt.shellActivation  - Activation change from Shell {SSH Authentication}@1E95534 to null
19264293 (2013-09-07 13:26:01,853) [Thread-165] ERROR smartgit.ssh.trilead  - com.trilead.ssh2.transport.TransportManager: Receive thread: error in receiveLoop: Cannot read full block, EOF reached.
23254777 (2013-09-07 14:32:32,337) [main] INFO  q.swt.shellActivation  - shell activated Shell {SSH Authentication}@1E95534
23254777 (2013-09-07 14:32:32,337) [main] INFO  q.swt.shellActivation  - Activation change from null to Shell {SSH Authentication}@1E95534
23257318 (2013-09-07 14:32:34,878) [main] INFO  q.swt.shellActivation  - shell deactivated Shell {SSH Authentication}@1E95534
23257320 (2013-09-07 14:32:34,880) [main] INFO  q.swt.shellActivation  - Activation change from Shell {SSH Authentication}@1E95534 to null
23325752 (2013-09-07 14:33:43,312) [main] INFO  q.swt.shellActivation  - shell activated Shell {SSH Authentication}@1E95534
23325752 (2013-09-07 14:33:43,312) [main] INFO  q.swt.shellActivation  - Activation change from null to Shell {SSH Authentication}@1E95534
23326238 (2013-09-07 14:33:43,798) [main] INFO  q.swt.shellActivation  - shell deactivated Shell {SSH Authentication}@1E95534
23326239 (2013-09-07 14:33:43,799) [main] INFO  q.swt.shellActivation  - Activation change from Shell {SSH Authentication}@1E95534 to null

`

2

There are 2 answers

1
Lazy Badger On BEST ANSWER
  • SmartGit can process only OpenSSH-type keys
  • Puttygen generates Putty-type keys

You must convert (with Puttygen) previously created Putty's *.ppk

PuTTY-User-Key-File-2: ssh-rsa
...

to OpenSSH's private key file

-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----

and use with Smart* line only OpenSSH-version of keys

0
Steve Tran On

Thank all! I have solved it myself. My mistake is did not use the absolute path in git link. Also, I didn't set git user's home directory correctly so cause the error permission denied too.

Then remove end line characters from each SSH key on authorized_keys. That'll did the trick!