git svn branch导致身份验证失败

Cha*_*ell 8 git-svn

我正在尝试完成所有的分支和合并git-svn,但是我在颠覆中挂断了分支.

我们的管理员告诉我,我对repo有完全的读/写权限,我可以获取最新的代码.

为了测试,我删除了我的~/.subversion/svn.simple目录并运行了它.

04:13 pm [214423L] C:\Dev\MyFooApp.Bar [master]
$ git svn fetch
Authentication realm: <https://code:443> VisualSVN Server
Password for 'cflorell': {my password}

04:14 pm [214423L] C:\Dev\MyFooApp.Bar [master]
$ git svn fetch

04:14 pm [214423L] C:\Dev\MyFooApp.Bar [master]
$
Run Code Online (Sandbox Code Playgroud)

此外,如果我使用Tortoise克隆repo,然后使用svn它创建一个分支似乎工作.

04:43 pm [214423L] C:\Dev\MyFooApp.Bar
$ svn copy https://code/svn/MyFooApp.Bar/trunk https://code/svn/MyFooApp.Bar/branches/test-branch -m "test branch"
Committing transaction...
Committed revision 93.
Run Code Online (Sandbox Code Playgroud)

但是在尝试使用时创建分支时git-svn,它仍然表示我的身份验证无效.

04:14 pm [214423L] C:\Dev\MyFooApp.Bar [master]
$ git svn branch develop
Copying https://code/svn/MyFooApp.Bar/trunk at r92 to https://code/svn/MyFooApp.Bar/branches/develop...
Authentication failed: Unable to connect to a repository at URL 'https://code/svn/MyFooApp.Bar/trunk': No more credentials or we tried too many times.
Authentication failed at C:\Program Files\Git\mingw64/libexec/git-core\git-svn line 1196.

04:14 pm [214423L] C:\Dev\MyFooApp.Bar [master]
$
Run Code Online (Sandbox Code Playgroud)

我的config文件是我认为正确的.

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[svn-remote "svn"]
    url = https://code/svn/MyFooApp.Bar
    fetch = trunk:refs/remotes/svn/trunk
    branches = branches/*:refs/remotes/svn/*
    tags = tags/*:refs/remotes/svn/tags/*
Run Code Online (Sandbox Code Playgroud)

我可能会在哪里出错?

Von*_*onC 5

请注意,超过一年后(2017年3月),Git 2.13 +(2017年第二季度)应该避免该git svn身份验证问题.

Hiroshi Shirosaki()提交e0688e9(2017年3月6日). shirosaki

它承认,认证失败,svn branchsvn rebasesvn dcommit没有验证失败做工精细.

$ 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.
Run Code Online (Sandbox Code Playgroud)

我们添加auth配置SVN::Client->new()来解决问题.


小智 3

所以看起来Tortoise SVN和git-svn之间存在冲突,我不确定其他版本的SVN中是否存在这种冲突,但我卸载了Tortoise SVN,然后能够使用分支git svn branch branchName

C:\Files\Source\Repos\applications\core\App01>git svn branch branchName
Copying http://url/svn/company/applications/core/App01/trunk
 at r7071 to http://url/svn/company/applications/core/App01/
branches/branchName...
Found possible branch point: http://url/svn/company/applications/core/App01/trunk => http://url/svn/company/applications/core/App01/branches/branchName, 7071
Found branch parent: (refs/remotes/origin/branchName) f8ba2fd450c30d4812b7549217eae1b2d5c7dd00
Following parent with do_switch
Successfully followed parent
r15037 = 52dd759833fd89c7be03f89093aba38090b3288f (refs/remotes/origin/branchName)

C:\Files\Source\Repos\applications\core\App01>
Run Code Online (Sandbox Code Playgroud)

暂时尝试一下其他 SVN 浏览器,看看是否也有问题。