* git-svn dcommit ignores --username if there are cached credentials
@ 2010-01-12 22:47 Michel Jouvin
2010-01-13 5:41 ` Eric Wong
0 siblings, 1 reply; 3+ messages in thread
From: Michel Jouvin @ 2010-01-12 22:47 UTC (permalink / raw)
To: git
Hi,
I am new to Git and using 1.6.6. I'm very interested by using it to mirror SVN
repositories. But I am running into troubles with the way git-svn handles SVN
credentials.
For one SVN I use I have some cached credentials that have only very restricted
write access. With svn command, I am using --username for every commit and this
cached credential is just ignored: I'm asked for a password.
With git-svn, I use --username at init/fetch but during dcommit --username is
ignored becaused of the cached credential. I can see in SVN logs that the
cached credential (which doesn't have the right to commit the mods I made) has
been used instead of the one specified during fetch. If I removed the cached
credential, the username specified with --username is taken into account (I'm
asked a password for it and it works) and if I ommit the --username, the one
specified at fetch time is used.
IMO, looks like a bug... Thanks in advance for any comment.
Cheers,
Michel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-svn dcommit ignores --username if there are cached credentials
2010-01-12 22:47 git-svn dcommit ignores --username if there are cached credentials Michel Jouvin
@ 2010-01-13 5:41 ` Eric Wong
2010-01-13 7:05 ` Michel Jouvin
0 siblings, 1 reply; 3+ messages in thread
From: Eric Wong @ 2010-01-13 5:41 UTC (permalink / raw)
To: Michel Jouvin; +Cc: git
Michel Jouvin <jouvin@lal.in2p3.fr> wrote:
> Hi,
>
> I am new to Git and using 1.6.6. I'm very interested by using it to mirror SVN
> repositories. But I am running into troubles with the way git-svn handles SVN
> credentials.
>
> For one SVN I use I have some cached credentials that have only very restricted
> write access. With svn command, I am using --username for every commit and this
> cached credential is just ignored: I'm asked for a password.
>
> With git-svn, I use --username at init/fetch but during dcommit --username is
> ignored becaused of the cached credential. I can see in SVN logs that the
> cached credential (which doesn't have the right to commit the mods I made) has
> been used instead of the one specified during fetch. If I removed the cached
> credential, the username specified with --username is taken into account (I'm
> asked a password for it and it works) and if I ommit the --username, the one
> specified at fetch time is used.
>
> IMO, looks like a bug... Thanks in advance for any comment.
Hi Michel,
I wonder if this is because we explicitly reread the config directory
when creating Git::SVN::Editor.
Does using --no-auth-cache work for you?
Otherwise, try pointing --config-dir= to an empty directory.
Or you can try this patch to force us to not reread the config_dir:
diff --git a/git-svn.perl b/git-svn.perl
index 650c9e5..280fd15 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -550,9 +550,6 @@ sub cmd_dcommit {
my %ed_opts = ( r => $last_rev,
log => get_commit_entry($d)->{log},
ra => Git::SVN::Ra->new($url),
- config => SVN::Core::config_get_config(
- $Git::SVN::Ra::config_dir
- ),
tree_a => "$d~1",
tree_b => $d,
editor_cb => sub {
We have a good reason to read config dirs there for getting auto-props,
though, so the above patch isn't going into git.git
--
Eric Wong
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: git-svn dcommit ignores --username if there are cached credentials
2010-01-13 5:41 ` Eric Wong
@ 2010-01-13 7:05 ` Michel Jouvin
0 siblings, 0 replies; 3+ messages in thread
From: Michel Jouvin @ 2010-01-13 7:05 UTC (permalink / raw)
To: git
Eric Wong <normalperson <at> yhbt.net> writes:
> Hi Michel,
>
> I wonder if this is because we explicitly reread the config directory
> when creating Git::SVN::Editor.
>
> Does using --no-auth-cache work for you?
>
> Otherwise, try pointing --config-dir= to an empty directory.
>
> Or you can try this patch to force us to not reread the config_dir:
>
> diff --git a/git-svn.perl b/git-svn.perl
> index 650c9e5..280fd15 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -550,9 +550,6 @@ sub cmd_dcommit {
> my %ed_opts = ( r => $last_rev,
> log => get_commit_entry($d)->{log},
> ra => Git::SVN::Ra->new($url),
> - config => SVN::Core::config_get_config(
> - $Git::SVN::Ra::config_dir
> - ),
> tree_a => "$d~1",
> tree_b => $d,
> editor_cb => sub {
>
> We have a good reason to read config dirs there for getting auto-props,
> though, so the above patch isn't going into git.git
>
Hi Eric,
Thanks for your quick answer. Unfortunatly, none of the suggested workaround
worked for me... I even tried to clone again the SVN repository passing the
suggested options when cloning but no effect. BTW, does specifying --username
at cloning time should add something to some config file (like .git/config) ?
Cheers,
Michel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-13 7:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-12 22:47 git-svn dcommit ignores --username if there are cached credentials Michel Jouvin
2010-01-13 5:41 ` Eric Wong
2010-01-13 7:05 ` Michel Jouvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).