gpt4 book ai didi

git-svn - git svn 分支导致身份验证失败

转载 作者:行者123 更新时间:2023-12-02 11:00:22 24 4
gpt4 key购买 nike

我正在尝试通过 git-svn 完成所有分支和合并,但是我对 subversion 中的分支很感兴趣。

我们的管理员告诉我,我对存储库拥有完整的读/写权限,并且我可以获取最新的代码。

为了进行测试,我删除了 ~/.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]
$

此外,如果我使用 Tortoise 克隆存储库,然后使用 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/*

这一切我可能哪里出了问题?

最佳答案

请注意,一年多后(2017 年 3 月),Git 2.13+(2017 年第 2 季度)应该可以避免 git svn 身份验证问题。

参见commit e0688e9 (2017 年 3 月 6 日)作者:Hiroshi Shirosaki (shirosaki)

它识别出 svnbranch 身份验证失败,而 svn 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.

We add auth configuration to SVN::Client->new() to fix the issue.

关于git-svn - git svn 分支导致身份验证失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34623108/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com