git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-svn: Configure a prompt callback for gnome_keyring.

From
Matthijs Kooijman <matthijs@stdin.nl>
Date
Aug 29, 2013, 09:42 UTC
Message-ID
<20130829094205.GO10217@login.drsnuggles.stderr.nl>
In-Reply-To
<1371573490-21973-1-git-send-email-matthijs@stdin.nl>
Hi folks,
any chance this patch can be merged?
Gr.
Matthijs
On Tue, Jun 18, 2013 at 06:38:10PM +0200, Matthijs Kooijman wrote:
Show 54 quoted lines
> This allows git-svn to prompt for a keyring unlock password, when a
> the needed gnome keyring is locked.
> 
> This requires changes in the subversion perl bindings which have been
> committed to svn trunk (r1241554 and some followup commits) and are
> first available in the 1.8.0 release.
> ---
>  perl/Git/SVN/Prompt.pm |  5 +++++
>  perl/Git/SVN/Ra.pm     | 13 +++++++++++++
>  2 files changed, 18 insertions(+)
> 
> diff --git a/perl/Git/SVN/Prompt.pm b/perl/Git/SVN/Prompt.pm
> index e940b08..faeda01 100644
> --- a/perl/Git/SVN/Prompt.pm
> +++ b/perl/Git/SVN/Prompt.pm
> @@ -23,6 +23,11 @@ sub simple {
>  	$SVN::_Core::SVN_NO_ERROR;
>  }
>  
> +sub gnome_keyring_unlock {
> +	my ($keyring, $pool) = @_;
> +	_read_password("Password for '$keyring' GNOME keyring: ", undef);
> +}
> +
>  sub ssl_server_trust {
>  	my ($cred, $realm, $failures, $cert_info, $may_save, $pool) = @_;
>  	$may_save = undef if $_no_auth_cache;
> diff --git a/perl/Git/SVN/Ra.pm b/perl/Git/SVN/Ra.pm
> index 75ecc42..38ed0cb 100644
> --- a/perl/Git/SVN/Ra.pm
> +++ b/perl/Git/SVN/Ra.pm
> @@ -104,6 +104,19 @@ sub new {
>  		}
>  	} # no warnings 'once'
>  
> +	# Allow git-svn to show a prompt for opening up a gnome-keyring, if needed.
> +	if (defined(&SVN::Core::auth_set_gnome_keyring_unlock_prompt_func)) {
> +		my $keyring_callback = SVN::Core::auth_set_gnome_keyring_unlock_prompt_func(
> +			$baton,
> +			\&Git::SVN::Prompt::gnome_keyring_unlock
> +		);
> +		# Keep a reference to this callback, to prevent the function
> +		# (reference) from being garbage collected.  We just add it to
> +		# the callbacks value, which are also used only to prevent the
> +		# garbage collector from eating stuff.
> +		$callbacks = [$callbacks, $keyring_callback]
> +	}
> +
>  	my $self = SVN::Ra->new(url => $url, auth => $baton,
>  	                      config => $config,
>  			      pool => SVN::Pool->new,
> -- 
> 1.8.3.rc1
> 
Previous: Matthijs KooijmanNext: Eric Wong
Message 16 of 35 in “git-svn won't remember pem password”
  1. IgorFeb 18, 2012
  2. Jakub NarebskiFeb 18, 2012
  3. Nikolaus DemmelFeb 19, 2012
  4. Jeff KingFeb 20, 2012
  5. Nikolaus DemmelFeb 20, 2012
  6. Eric WongFeb 19, 2012
  7. Matthijs KooijmanApr 26, 2012
  8. IgorApr 26, 2012
  9. Matthijs KooijmanApr 26, 2012
  10. 1/2 git-svn: use platform specific auth providersMatthijs Kooijman, Apr 26, 2012
  11. 2/2 git-svn: Configure a prompt callback for gnome_keyring.Matthijs Kooijman, Apr 26, 2012
  12. Eric WongApr 27, 2012
  13. Matthijs KooijmanApr 27, 2012
  14. Matthijs KooijmanJun 18, 2013
  15. git-svn: Configure a prompt callback for gnome_keyring.Matthijs Kooijman, Jun 18, 2013
  16. Matthijs KooijmanAug 29, 2013
  17. Eric WongAug 29, 2013
  18. Matthijs KooijmanApr 27, 2012
  19. Eric WongApr 27, 2012
  20. Matthijs KooijmanApr 27, 2012
  21. Eric WongApr 29, 2012
  22. Junio C HamanoApr 30, 2012
  23. Junio C HamanoApr 30, 2012
  24. Eric WongApr 30, 2012
  25. Junio C HamanoApr 30, 2012
  26. Matthijs KooijmanApr 30, 2012
  27. Eric WongApr 30, 2012
  28. Matthijs KooijmanApr 30, 2012
  29. Junio C HamanoMay 1, 2012
  30. Charles BaileyJun 3, 2012
  31. Junio C HamanoJun 3, 2012
  32. Matthijs KooijmanJun 4, 2012
  33. Junio C HamanoJun 4, 2012
  34. Eric WongJun 4, 2012
  35. Eric WongAug 29, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.