After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 641376 - Two attempts required to save passphrase, SSH from file manager
Two attempts required to save passphrase, SSH from file manager
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
0.x.x [obsolete]
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-03 17:22 UTC by Paul W. Frields
Modified: 2011-09-07 19:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.25 KB, patch)
2011-04-15 17:00 UTC, Tomas Bzatek
committed Details | Review

Description Paul W. Frields 2011-02-03 17:22:46 UTC
Using gnome-keyring 2.91.4, from Fedora's GNOME 3 Alpha test day.  Steps to reproduce:

1. Open file manager
2. Choose Connect to Server
3. Type in a new IP address, and select SSH for connection type
4. Provide folder name (/home/<user> in this case)
5. Provide user name and passphrase, select Save password.

SSH fingerprint dialog appears as expected, connection is OK.  But upon trying again, when I only provide a user name, the connection does not succeed. I have to enter the passphrase again with Save password enabled for the keyring to save the credentials.  Following the second attempt, the keyring appears to work correctly.
Comment 1 Paul W. Frields 2011-02-03 17:23:21 UTC
nautilus-2.91.8-4.fc15.x86_64
Comment 2 Stef Walter 2011-02-04 12:20:26 UTC
From the description, I believe this is a gvfs problem. It appears to me that the ssh mount code isn't properly saving the passphrase in the keyring when the fingerprint dialog is involved.

Let me know if my diagnosis seems incorrect.
Comment 3 Tomas Bzatek 2011-03-10 14:21:23 UTC
You might be using two different URIs - e.g. sftp://localhost/ (specifying the username later in GtkMountOperation dialog) and sftp://user@localhost/ makes a big difference. So you might end up having two records in keyring.

Best way to check is via Seahorse or by looking at the Nautilus address bar. Please confirm my hypothesis.
Comment 4 Paul W. Frields 2011-03-10 14:35:43 UTC
I was careful to enter exactly the same information in the dialog in both attempts.  Will retry with a newer GNOME 3 build shortly to confirm the problem.
Comment 5 Tomas Bzatek 2011-03-10 14:45:54 UTC
(In reply to comment #4)
> I was careful to enter exactly the same information in the dialog in both
> attempts.  Will retry with a newer GNOME 3 build shortly to confirm the
> problem.

Yeah, that's a different issue - just that user not directly encoded in the URI is treated like a separate case.

In your original test case, did you go through the Connect to Server dialog again or did you use a bookmark (if you ever created one)?
Comment 6 Paul W. Frields 2011-03-10 14:54:01 UTC
I went through the Connect to Server dialog again.  I didn't create a bookmark.
Comment 7 Tomas Bzatek 2011-04-15 15:55:08 UTC
Confirming the original issue, reproducible here with gvfs-1.8.0-1.fc15, libgnome-keyring-3.0.0-1.fc15, gnome-keyring-3.0.0-1.fc15 and nautilus-3.0.0-1.fc15.

Fingerprint confirmation dialog wasn't involved in my case, a record already exists in known_hosts. So much for comment 2.

Before the test I removed all keyrings, removed ~/.gnome2/keyrings altogether. Then logged in. gnome-keyring-daemon was properly initialized, "login" keyring autocreated.

Looks to me like nautilus-connect-server problem:
 1. if the login succeeds on the first try, it doesn't save the password
 2. if I don't provide a password, error is reported and the second try finally saves the password. 

Going to look at this more, on Monday.
Comment 8 Tomas Bzatek 2011-04-15 17:00:06 UTC
Created attachment 186038 [details] [review]
proposed patch
Comment 9 Cosimo Cecchi 2011-09-07 19:41:19 UTC
Thanks this looks fine. I pushed it to master now.