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

[PATCH v2] git svn: fix authenticaton with 'branch'

From
HSHiroshi Shirosaki <h.shirosaki@gmail.com>
Date
Mar 6, 2017, 05:59 UTC
Message-ID
<1488779947-25264-1-git-send-email-h.shirosaki@gmail.com>

Authentication fails with svn branch while svn rebase and svn dcommit work fine without authentication failures.

$ git svn branch v7_3 Copying https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx at r27519 to https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/v7_3... Can't create session: Unable to connect to a repository at URL 'https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx': No more credentials or we tried too many times. Authentication failed at C:\Program Files\Git\mingw64/libexec/git-core\git-svn line 1200.

We add auth configuration to SVN::Client->new() to fix the issue.
Signed-off-by: Hiroshi Shirosaki <h.shirosaki@gmail.com>
---
 git-svn.perl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/git-svn.perl b/git-svn.perl
index fa42364..d240418 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -1175,10 +1175,10 @@ sub cmd_branch {
 	::_req_svn();
 	require SVN::Client;
 
+	my ($config, $baton, undef) = Git::SVN::Ra::prepare_config_once();
 	my $ctx = SVN::Client->new(
-		config => SVN::Core::config_get_config(
-			$Git::SVN::Ra::config_dir
-		),
+		auth => $baton,
+		config => $config,
 		log_msg => sub {
 			${ $_[0] } = defined $_message
 				? $_message
-- 
2.7.4
Next: Eric Wong
Message 1 of 3 in “git svn: fix authenticaton with 'branch'”
  1. git svn: fix authenticaton with 'branch'Hiroshi Shirosaki, Mar 6, 2017
  2. [PULL] git svn branch authentication fixEric Wong, Mar 7, 2017
  3. Junio C HamanoMar 7, 2017

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.