Bug 375776 - KF5-based doesn't display the authorization dialog for ssh
Summary: KF5-based doesn't display the authorization dialog for ssh
Status: RESOLVED FIXED
Alias: None
Product: kdesvn
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KDESvn default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-31 04:53 UTC by Safa Alfulaij
Modified: 2017-09-15 18:52 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Safa Alfulaij 2017-01-31 04:53:07 UTC
kdesvn doesn't ask me for my ssh password, and just displays the common error in the errors box:

Unable to connect to a repository at URL 'svn+ssh://svn@svn.kde.org/home/kde'
To better debug SSH connection problems, remove the -q option from 'ssh' in the [tunnels] section of your Subversion configuration file.
Filling log cache in background finished.

I tried running it from the terminal, and I saw that the it is requesting my password from there "Enter passphrase for key '/home/safa/.ssh/id_rsa':"!
I entered the password and it worked for caching log entries (that progress bar appears now, which did not before when started graphically).
For updating to HEAD, I see 3 password promots, and entering my password whatever number of times doesn't work.

kdesvnaskpass is installed and works when executed from terminal.
Comment 1 Christoph Feck 2017-02-14 20:17:47 UTC
If this requires ksshaskpass, and this error only appears in Plasma 5.9, it could be a duplicate of bug 376228.
Comment 2 Safa Alfulaij 2017-02-14 20:25:53 UTC
I faced it even before Plasma 5.8 maybe :-)
Months months ago..
Comment 3 Christian Ehrlicher 2017-02-26 19:57:11 UTC
Looks like this was already fixed by Luigi Toscano, adding them to this bug
Comment 4 Luigi Toscano 2017-02-26 20:04:29 UTC
I fixed the code of kdesvnaskpass, few steps of the porting to KF5 were missing. I could not test if this change fixed the bug, that's why I did not CC it in the commit message. 
It may have fixed the bug as kdesvnaskpass does not print error messages related to the command line parser on the console anymore.

This is the commit:
https://commits.kde.org/kdesvn/8be5c9f4f27d3312715c0d60ea6c088ae32283b7
Comment 5 Christian Ehrlicher 2017-02-27 19:52:07 UTC
With latest git version (and also with the one without the changes from Luigi Toscano), I can not reproduce the behaviour - kdesvnaskpass is opened every time ...
Comment 6 Safa Alfulaij 2017-09-14 22:50:33 UTC
Any way to debug the roots of the problem? I think I'll go deep and check the code and recompile it with changes till I reach to the issue, but if I can skip this it will be better :)
Comment 7 Christian Ehrlicher 2017-09-15 04:55:46 UTC
Did you really try the latest master - it works for me and have no glue why this should not work.
Comment 8 Safa Alfulaij 2017-09-15 05:46:41 UTC
I just downloaded the latest (using AUR) and it still have the same exact problem.
Opening from terminal shows the "Enter passphrase" promot, and from Plasma it shows that "Unable to connect" ssh problem.
When I switch back to 1.7, it works without changing any of my setup.
It might be a wrong setup, but I really don't know.
Comment 9 Safa Alfulaij 2017-09-15 06:31:51 UTC
:-)
3 lines, 3 lines of code.

diff --git a/src/helpers/sshagent.cpp b/src/helpers/sshagent.cpp
index 6e3a9635..e624a6cd 100644
--- a/src/helpers/sshagent.cpp
+++ b/src/helpers/sshagent.cpp
@@ -92,6 +92,9 @@ void SshAgent::askPassEnv()
     qputenv("SSH_ASKPASS", FORCE_ASKPASS);
 #else
     QByteArray pro = BIN_INSTALL_DIR;
+    if (!pro.startsWith('/')) {
+        pro.prepend('/');
+    }
     if (!pro.endsWith('/')) {
         pro.append('/');
     }

From https://i.imgur.com/6EBFcdV.png to https://i.imgur.com/I6D8ErX.png

Candy for all 🍬🍬

P.S: That's one big promot window..
Comment 10 Christian Ehrlicher 2017-09-15 18:52:31 UTC
I fixed it a slightly different way, but should work too ...

https://commits.kde.org/kdesvn/8cdc05717b0636384f22543f43b516fde7439c1e