How do I “upload” tags to Gerrit using repo?

被刻印的时光 ゝ 提交于 2019-12-11 18:40:46

问题


I have inherited an Android project that uses the Gerrit and Repo tools to manage the Git repositories on a VM. My normal work flow involves using the git add and git commit commands to work on my local branch and using repo sync and repo upload to update the remote. After repo upload I use Gerrit to approve changes for myself and others. This is working okay except that I cannot figure out how to upload the tags I have created on my local branch. I have tried using the git push --tags command directly but I get an error the the repository is not exported. I assume that is because the repo upload command does something different and the git push command is trying to violate the rules. I am obviously new to this and would appreciate any help. Thanks.


回答1:


For upload purposes, the Repo tool is only capable of uploading commits for review. It can't upload tags. You can use git push --tags just like you would with any other Git server. Just make sure you have the necessary permissions; in particular you'll need Push Annotated Tag for refs/tags/* (and probably Push Signed Tag too), Forge Author, and Forge Committer. The latter two are required for you to be allowed to upload tag objects created by someone other than yourself.



来源:https://stackoverflow.com/questions/27911273/how-do-i-upload-tags-to-gerrit-using-repo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!