2016-01-05 40 views
7

我试图通过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] 
$ 

另外,如果我使用克隆龟回购,然后创建一个使用它似乎工作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. 

但尝试使用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] 
$ 

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/* 

我在哪里可能会出错?

+0

你有没有解决过这个问题?我遇到了类似的情况,不得不求助于使用svn客户端来创建标签分支,因为我无法想出一个通过这种方式。 – Caleb

+0

我从来没有做过,我说服我们公司转向GIT。 –

+0

为了你的缘故,我很高兴为这个结果!不幸的是,WordPress插件存储库似乎需要Subversion部署插件,刚刚通过'r1360603',显示没有减速的迹象,我不认为它会迁移到DVCS。 – Caleb

回答

2

因此,它看起来像有乌龟SVN和git-svn的有冲突,我不知道这是否存在于SVN或其他版本中没有,但我卸载乌龟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> 

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

+0

这与我在尝试切换到git-svn之前也运行了Tortoise SVN的事实一致。 –

+0

我在Linux上,从来没有使用任何东西,但git命令行工具,乌龟不参与这个对我来说。 – Caleb

+0

没有为我工作。 – Nikolai

3

请注意,超过一年以后(2017年3月),Git 2.13+(Q2 2017)应该避免git svn身份验证问题。

请参阅commit e0688e9(2017年3月6日)作者:Hiroshi Shirosaki (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. 

我们添加验证配置SVN::Client->new()来解决该问题。