git svn branch导致身份验证失败 [英] git svn branch results in Authentication failed

查看:250
本文介绍了git svn branch导致身份验证失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过git-svn进行所有分支和合并,但是我在Subversion中挂断了分支.

I'm trying to do all of my branching and merging via git-svn, however I'm hung up on the branching in subversion.

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

Our admin tells me that I have full read/write permissions on the repo, and I CAN fetch the latest code.

为了进行测试,我删除了~/.subversion/svn.simple目录并运行了该文件.

For a test, I deleted my ~/.subversion/svn.simple directory and ran this.

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创建分支,则它似乎可以正常工作.

Also, if I clone the repo using Tortoise, and then create a branch using svn it appears to work.

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创建分支时,它仍然说我的身份验证无效.

But upon trying to create a branch using git-svn, it still says my auth is invalid.

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年第二季度)应避免出现git svn身份验证问题.

Note that more than a year later (March 2017), Git 2.13+ (Q2 2017) should avoid that git svn authentication issue.

请参见提交e0688e9 (2017年3月6日): //github.com/shirosaki"rel =" noreferrer> Hiroshi Shirosaki(shirosaki).

See commit e0688e9 (06 Mar 2017) by Hiroshi Shirosaki (shirosaki).

它认识到身份验证失败并使用svn branch,而svn rebasesvn dcommit正常运行而没有身份验证失败.

It recognizes that 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.

我们将身份验证配置添加到SVN::Client->new()以解决该问题.

这篇关于git svn branch导致身份验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆