2014-09-19 42 views
3

SVN回購克隆到Git回購工作正常。
但是我有上面列出的所有應遙控器的標籤轉換爲本地的
SVN to Git使用svn-migration-scripts

java -Dfile.encoding=utf-8 -jar c:\svn-migration-scripts.jar clean-git --force 

命令的問題。
但我收到:

# Creating annotated tags... 
tag has diverged: 1.0_RC1 
Creating annotated tag '1.0_RC1' at refs/remotes/tags/1.0_RC1. 
# Creating local branches... 
# Checking for obsolete tags... 
svn: E215004: Authentication failed and interactive prompting is disabled; see t 
he --force-interactive option 
svn: E215004: Unable to connect to a repository at URL 'http://127.0.0.1/svn/dri 
veLearner/tags' 
svn: E215004: No more credentials or we tried too many times. 
Authentication failed 
Deleting Git tag '1.0_RC1' not in Subversion. 
Deleted tag '1.0_RC1' (was d200bf6) 
# Checking for obsolete branches... 
svn: E215004: Authentication failed and interactive prompting is disabled; see t 
he --force-interactive option 
svn: E215004: Unable to connect to a repository at URL 'http://127.0.0.1/svn/dri 
veLearner/branches' 
svn: E215004: No more credentials or we tried too many times. 
Authentication failed 
No obsolete branches to remove. 
# Cleaning tag names 
# Cleaning branch names 

我用winXP的地方,JAVA 1.7_65,VisualSVN服務器(HTTP,端口80)。每個人都可以在讀/寫模式下使用回購。
有趣的是,我做了這個過程,但在其他回購成功後,同樣的問題,但我不知道我做了什麼。
有人解決一些問題嗎?

回答

6

Atlassian的這個svn-migration-script.java是一個廢話。 這裏是詳細的說明如何從SVN遷移到Git與最少的第三方軟和保留本地分支機構和標籤。

詳細教程:http://www.sailmaker.co.uk/blog/2013/05/05/migrating-from-svn-to-git-preserving-branches-and-tags-3/

SVN服務器:
網址:[svn_address]/[PROJECT_NAME]/[PROJECT_NAME]
用戶:[USER]
通:[通]
(用於訪問用戶[用戶]:RW)

目標:
C:[eclipse_workspace] [PROJECT_NAME](創建目錄如果不存在)

步驟:
++在你的系統上安裝的svn和git(使用Git的Bash)(可選他們的 '本' 目錄添加到PATH)
++確保SVN serwer在HTTP模式下工作(不是HTTPS)
++使authors.txt如果必要
++克隆svn的與git:git svn clone --stdlayout --authors-file=c:\authors.txt
[svn_address]/[PROJECT_NAME] C:[eclipse_workspace] [PROJECT_NAME] [用戶] [通]
命令rebase -b 0x64000000 "c:\program files\git\bin\libsvn_repos-1-0.dll"(或類比)可以是有用的,如果出現映射的一些錯誤
++從上下文菜單運行Git Bash(你應該已經安裝了這個)
++型git branch -a檢查的分支和標籤
++型混帳擊:

附加分支:

for branch in `git branch -r | grep "branches/" | sed 's/ branches\///'`; do 
    git branch $branch remotes/branches/$branch 
done 

附上標籤:

for tag in `git branch -r | grep "tags/" | sed 's/ tags\///'`; do 
git tag $tag remotes/tags/$tag 
done 

++創建裸Git倉庫並推送那裏[項目](你會失去SVN的依賴)
++克隆[項目]到目標位置

+0

小評了這一點。過了一段時間(我花了一點時間熟悉Git和側邊工具),我注意到這種導入標籤的方式確實創建了本地標籤,但也創建了一個分支。 Hovewer進一步提交是在master中進行的。 – rainbow 2014-11-28 06:44:00

+0

當我想附加標籤或分支與bash腳本,我有這個錯誤:「致命:無法解決'遙控器/標籤/ svn /標籤/ ...'作爲一個有效的參考」 – MychaL 2017-02-27 08:40:07

0

這是我得到了這個工作(在Mac OSX):

  1. 添加憑據相應想跑svn log your-repo-url〜/的.subversion /認證文件文件
  2. 只是爲了看看svn的身份驗證正在
  3. 在Mac,這將讓我用我的鑰匙串,我選擇了「總是允許」
  4. 這個我clean-git命令將開始工作,以及

還有票記錄here但目前還沒有得到任何的注意力從維護