Git libsecret No Unlock Dialog Issue
When using Git on Fedora with locked password store credential-libsecret asks for username/password instead of displaying the unlock dialog.
If the store is unlocked credential helper gets the credentials from the store though.
Signature · 2 lines
Regards, Yaroslav Sapozhnyk
Quoted 3 lines · Yaroslav Sapozhnyk
When using Git on Fedora with locked password store credential-libsecret asks for username/password instead of displaying the unlock dialog.
Git as packaged by Fedora or upstream Git (which version)?
Quoted 6 lines
If the store is unlocked credential helper gets the credentials from the store though.
--
Regards,
Yaroslav Sapozhnyk
Sorry, should have mentioned that. It's packaged by Fedora - 2.13.6.
Yaroslav
Quoted 14 lines · Stefan Beller
Quoted 3 lines · Yaroslav Sapozhnyk
When using Git on Fedora with locked password store credential-libsecret asks for username/password instead of displaying the unlock dialog.
Git as packaged by Fedora or upstream Git (which version)?
Quoted 6 lines
If the store is unlocked credential helper gets the credentials from the store though.
--
Regards,
Yaroslav Sapozhnyk
Signature · 2 lines
Regards, Yaroslav Sapozhnyk
Quoted 7 lines · Stefan Beller
Quoted 3 lines · Yaroslav Sapozhnyk
When using Git on Fedora with locked password store credential-libsecret asks for username/password instead of displaying the unlock dialog.
Git as packaged by Fedora or upstream Git (which version)?
Looking at the code: current upstream git. Looking at the documentation for libsecret, this should fix it. I've not been able to test it though.
contrib/credential/libsecret/git-credential-libsecret.c +1 -1
@@ -104,7 +104,7 @@ static int keyring_get(struct credential *c) items =secret_service_search_sync (service,SECRET_SCHEMA_COMPAT_NETWORK , attributes, -SECRET_SEARCH_LOAD_SECRETS , +SECRET_SEARCH_LOAD_SECRETS |SECRET_SEARCH_UNLOCK ,NULL , &error);g_hash_table_unref (attributes);
I've tested the code change locally and seems like it fixes the issue.
Yaroslav
Quoted 26 lines · Dennis Kaarsemaker
Quoted 7 lines · Stefan Beller
Quoted 3 lines · Yaroslav Sapozhnyk
When using Git on Fedora with locked password store credential-libsecret asks for username/password instead of displaying the unlock dialog.
Git as packaged by Fedora or upstream Git (which version)?
Looking at the code: current upstream git. Looking at the documentation for libsecret, this should fix it. I've not been able to test it though.
contrib/credential/libsecret/git-credential-libsecret.c +1
-1@@ -104,7 +104,7 @@ static int keyring_get(struct credential *c) items =secret_service_search_sync (service,SECRET_SCHEMA_COMPAT_NETWORK , attributes, -SECRET_SEARCH_LOAD_SECRETS , +SECRET_SEARCH_LOAD_SECRETS |SECRET_SEARCH_UNLOCK ,NULL , &error);g_hash_table_unref (attributes);
Signature · 2 lines
Regards, Yaroslav Sapozhnyk
What version should include this fix? Cannot find a pr for it.
Thanks for providing the fix!
Regards,
Yaroslav
Quoted 38 lines · Yaroslav Sapozhnyk
I've tested the code change locally and seems like it fixes the issue.
Yaroslav
Quoted 18 lines · Dennis Kaarsemaker
Quoted 7 lines · Stefan Beller
Quoted 3 lines · Yaroslav Sapozhnyk
When using Git on Fedora with locked password store credential-libsecret asks for username/password instead of displaying the unlock dialog.
Git as packaged by Fedora or upstream Git (which version)?
Looking at the code: current upstream git. Looking at the documentation for libsecret, this should fix it. I've not been able to test it though.
contrib/credential/libsecret/git-credential-libsecret.c +0
-0contrib/credential/libsecret/git-credential-libsecret.c static int keyring_get(struct credential *c) · line 110
Quoted 8 lines
contrib/credential/libsecret/git-credential-libsecret.c +1
-1@@ -104,7 +104,7 @@ static int keyring_get(struct credential *c) items =secret_service_search_sync (service,SECRET_SCHEMA_COMPAT_NETWORK , attributes, -SECRET_SEARCH_LOAD_SECRETS , +SECRET_SEARCH_LOAD_SECRETS |SECRET_SEARCH_UNLOCK ,NULL , &error);g_hash_table_unref (attributes);--
Regards,
Yaroslav Sapozhnyk
Signature · 2 lines
Regards, Yaroslav Sapozhnyk
PATCH 1/1 credential-libsecret: unlock locked secrets
In reply to Yaroslav SapozhnykCredentials exposed by the secret service DBUS interface may be locked. Setting the SECRET_SEARCH_UNLOCK flag will make the secret service unlock these secrets, possibly prompting the user for credentials to do so. Without this flag, the secret is simply not loaded.
--- contrib/credential/libsecret/git-credential-libsecret.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
contrib/credential/libsecret/git-credential-libsecret.c +1 -1
@@ -104,7 +104,7 @@ static int keyring_get(struct credential *c) items =secret_service_search_sync (service,SECRET_SCHEMA_COMPAT_NETWORK , attributes, -SECRET_SEARCH_LOAD_SECRETS , +SECRET_SEARCH_LOAD_SECRETS |SECRET_SEARCH_UNLOCK ,NULL , &error);g_hash_table_unref (attributes);
Signature · 1 line
2.15.0-rc2-464-gb5de734
Re: [PATCH] credential-libsecret: unlock locked secrets
Quoted 24 lines · Dennis Kaarsemaker
Credentials exposed by the secret service DBUS interface may be locked. Setting the
SECRET_SEARCH_UNLOCKflag will make the secret service unlock these secrets, possibly prompting the user for credentials to do so. Without this flag, the secret is simply not loaded.Signed-off-by Dennis Kaarsemaker <[email protected]>--- contrib/credential/libsecret/git-credential-libsecret.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)contrib/credential/libsecret/git-credential-libsecret.c +1
-2@@ -104,7 +104,7 @@ static int keyring_get(struct credential *c) items =secret_service_search_sync (service,SECRET_SCHEMA_COMPAT_NETWORK , attributes, -SECRET_SEARCH_LOAD_SECRETS , +SECRET_SEARCH_LOAD_SECRETS |SECRET_SEARCH_UNLOCK ,NULL , &error);g_hash_table_unref (attributes); --
Quoted 2 lines
2.15.0-rc2-464-gb5de734
Looks okay. (It seems that's what all other programs do, too...)
Signature · 1 line
Mantas Mikulėnas <[email protected]>