This article describes the process of creating a tag and publishing it based on the master branch of the Gerrit Library.
1. Check to see if the appropriate access permissions are available on the Gerrit
reference:refs/tags/*
Push Annotated Tag
Push signed Tag
2. Get the default master branch from Gerrit to local and create the annotated tag locally
git clone ssh://myname@gerrit.server.com:29418/myparent/myproject
CD MyProject
Git tag-a-M "Adding v1.0 tag" v1.0 or Git tag-s-M "Adding v1.0 Tag" v1.03. Submit local tag to Gerrit
Git Push Origin v1.0 refs/tags/v1.0:refs/tags/v1.0
or GIT push Origin v1.0 head:refs/tags/v1.0
or GIT push Origin v1.0
or GIT push origin tag v1.0
or GIT push origin--tags# submit all tags locally
User@serverhost > Git tag-l
v0.0.1
v0.0.2
v0.0.3
v0.0.4
user@serverhost> git push origin-- Tags
counting objects:2, done.
Delta compression using up to 4 threads.
Compressing objects:100% (2/2), done.
Writing objects:100% (2/2), 198 bytes | 0 bytes/s, done.
Total 2 (Delta 1), reused 0 (Delta 0)
remote:resolving deltas:100% (1/1)
remote:processing Changes:refs:2, Done to
ssh://gerrit.server.com:29418/myparent/myproject
* [new tag] v0.0.3-v0.0.3
* [New Tag] v0.0.4-v0.0.4
4. Get the specified tag to the local
git clone ssh://myname@gerrit.server.com:29418/myparent/myproject
Git Checkout v1.0