PDA

View Full Version : Qt Creator doesn't ask for 'Gnome keyring', can't get connect to Subversion repo



dsab123
22nd August 2012, 14:26
Hello everybody,

I have somewhat of an annoying problem with subversion; I created an online repo with some code hosting site, and checked out the project using the console, and imported the project into Qt Creator; everything seemed to work as it should, I was able to diff, commit, and do everything else.

When I rebooted, however, Qt creator would respond with an error that looked something like 'Server rejected basic challenge' everytime I tried to do any Subversion commands like those mentioned above.

I later found that this is because Qt doesn't ask me for a 'Gnome keyring' password, which is the password for the repo; if I checkout the project every time I reboot (during which I AM asked the keyring password), then svn integration with Qt creator is fine.

Under Tools -> Options, I can there's an 'Authentication' group box that I can put in my hosting site account info, but nowhere can I find a keyring password...

So is there some way to specify this keyring password in Qt Creator, to save me some headache?

Thanks!


EDIT: Forgot to mention the code hosting site is Assembla.

ChrisW67
23rd August 2012, 00:32
The hosting site has nothing to do with this.

When ssh needs to ask for a password it looks for the SSH_ASKPASS variable and, if set, runs the program it identifies. In your case that's a Gnome utility, on my system that's a KDE equivalent (I also have ssh-add in one of my KDE autostart files so I am prompted once at the start of each day and never again). If the variable is not set then ssh queries its stdin for a password.

If the variable is not set and Qt Creator runs ssh without a terminal then it will probably just fail silently.

So, look at the environment that Qt Creator is running in and see if SSH_ASKPASS is set. My guess is that it differs from the one your terminal session has.

dsab123
23rd August 2012, 18:06
thanks for your reply, ChrisW67..so I took your advice and installed ssh-askpass, and specified its location in Qt Creator under Tools -> Options -> common -> SSH Prompt Command. I also ran ssh-askpass from the console and typed in the same password I use for the keyring mentioned earlier. Upon attempting to commit a file, I still get the 'Server rejected basic challenge' error.

Is there anything else I need to set that I don't know about?

EDIT: So I also tried exporting SSH_ASKPASS=/path/to/ssh-askpass in the console before attempting to commit a file through Qt, that didn't work either.

ChrisW67
24th August 2012, 01:10
The default ssh_askpass program is asking for the passphrase to unlock an SSH private key and does not know about the key ring.

The Gnome Keyring, from what I see, offers an SSH agent. If the key ring daemon is launched at the start of the session then the necessary plumbing (in the form of an SSH_AUTH_SOCK env var) should be in place.

Immediately after logging in...
What are the values of SSH_ASKPASS and/or SSH_AUTH_SOCK environment variables in a default terminal?
Is there a running gnome-keyring-daemon for your user?

If you set SSH_ASKPASS="gnome-keyring-daemon --start" does that help?