2016-06-30 24 views
0

我已經嘗試了幾種方法將git上的帶註釋的標籤推送到gerrit處理的存儲庫中。 創建V0.1具有:Gerrit - 推註釋標籤 - 「未能鎖定」

# git tag -a -m "message" v0.1 

然後,試圖推動的時候......

# git push --tags ssh://<user>@<gerrit server>/<project> 

它總是給我一個 「未能鎖定」 的錯誤。

... 
! [remote rejected] v0.1 -> v0.1 (failed to lock) 
... 

我已經配置了項目訪問權限,將推註標籤添加到refs/tags/*參考中。

還有什麼我失蹤了?

**編輯 - 添加從格里特GC和git fsck的結果:

$ ssh -p 29418 <user>@<server> gerrit gc <project> --show-progress 
collecting garbage for "<project>": 
Pack refs:    100% (13/13) 
Counting objects:  78 
Finding sources:  100% (78/78) 
Getting sizes:   100% (37/37) 
Writing objects:  100% (78/78) 
Selecting commits:  100% (7/7) 
Building bitmaps:  100% (7/7) 
Finding sources:  100% (23/23) 
Getting sizes:   100% (14/14) 
Compressing objects: 100% (3094/3094) 
Writing objects:  100% (23/23) 
Prune loose objects also found in pack files: 100% (24/24) 
Prune loose, unreferenced objects: 100% (24/24) 

現在混帳的fsck:

$ git fsck --no-dangling 
Checking object directories: 100% (256/256), done. 
Checking objects: 100% (101/101), done. 

一切似乎都OK了... 但是,仍然不能推註釋標籤到gerrit。

+0

喜丹尼爾,顯然事情是不對您的倉庫......你可以嘗試執行格里特GC:SSH -p 29418 @ gerrit gc - 顯示進度和「git fsck」:cd $ GERRIT_SITE/git/ .git; git fsck - 沒有懸掛。讓我知道這是否有幫助。 –

+0

嗨,馬塞洛!感謝您的幫助......不幸的是沒有工作。我用gerrit gc和git fsck的結果編輯了這篇文章。 –

+0

好的。另一種可能性:我認爲你在服務器中有一個名爲v0.1/的標籤。我能夠重現運行以下命令的「失敗鎖定」錯誤:git tag -a -m「Test」foo/boo; git push origin tag foo/boo; git tag -d foo/boo; git tag -a -m「測試」foo; git push origin tag foo。也許標籤v0.1/是錯誤創建的。 –

回答

1

也許您已經在服務器中創建了一個名爲v0.1或v0.1 /的標記。我能夠重現「未能鎖定」錯誤運行以下命令:

git tag -a -m "Test" foo/boo 
git push origin tag foo/boo 
git tag -d foo/boo 
git tag -a -m "Test" foo 
git push origin tag foo