我遇到以下错误,而镜像git repose时看不到这些标签是否存在,是否有一个不同的命令可用于镜像git repo?
-bash-4.1$ git push --mirror git@gitlab.sd.company.com:techFirmware/PROJECTmirror.git
Counting objects: 15, done.
Delta compression using up to 24 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 1.55 KiB, done.
Total 9 (delta 6), reused 0 (delta 0)
remote: GitLab: You are not allowed to change existing tags on this project.
To git@gitlab.sd.apple.com:techFirmware/PROJECTmirror.git
! [remote rejected] PROJECT1310T472R15_BRANCH_13_45 -> PROJECT1310T472R15_BRANCH_13_45 (pre-receive hook declined)
! [remote rejected] PROJECT1310T472R15_REL_13_45_63 -> PROJECT1310T472R15_REL_13_45_63 (pre-receive hook declined)
! [remote rejected] PROJECT1310T472R15_REL_13_45_63_RETAG -> PROJECT1310T472R15_REL_13_45_63_RETAG (pre-receive hook declined)
error: failed to push some refs to 'git@gitlab.sd.company.com:techFirmware/PROJECTmirror.git'
答案 0 :(得分:0)
这取决于您的GitLab服务器的版本 请参阅issue 25175,其中重复issue 24813并已使用MR 7700修正(GitLab 8.14.2):无法再使用开发者权限创建标记。
可能只是GitLab认为它是现有标签,即使它是新标签。
检查您是否是您要推送的存储库的所有者,该存储库应该是一个新的空存储库(以便通过push --mirror
导入您本地存储库的内容)。