2016-01-05 183 views
7

ブランチングとマージのすべてをgit-svnで行ってみたいと思いますが、私はSubversionのブランチングにハングアップしています。git svnブランチ結果の認証に失敗しました

私の管理者は、私がリポジトリに対して完全な読み取り/書き込み権限を持っていると伝え、最新のコードを取得できます。

テストのために、~/.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のプラグインリポジトリは、 'r1360603'を渡したばかりのプラグインをデプロイするためにSubversionに必要なようだが、減速の兆候は見られず、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コマンドラインツール以外は一度も使用していませんが、Tortoiseはこれに関与していません。 – Caleb

+0

私のために働かなかった。 – Nikolai

0

https://gist.github.com/kasparsd/3749872/563011118e33900b3a0ca89ec37f3c99be8e9c49によれば、git svnタグを使用して認証する方法はありません(以前は動作していましたが、動作を停止しました)。

代わりに、タグを提出する直接SVNを使用します。

svn cp <trunk-ul> <tag-url> -m "creating tag x.x" 

それはしかし、プレーンテキストでパスワードを保存するように依頼します。

3

1年後(2017年3月)、Git 2.13+(Q2 2017)は、git svn認証の問題を回避する必要があります。

commit e0688e9(2013年3月6日)Hiroshi Shirosaki (shirosaki)を参照してください。

svn branchで認証が失敗し、認証の失敗なしに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. 

我々は問題を解決するためにSVN::Client->new()に認証設定を追加します。

関連する問題