I am trying to add an existing repo to gerrit. I create an empty project and have tried pushing it (git push ssh://admin@localhost:29418/project *:*
). I get this error message in return:
Counting objects: 14, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 384 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 3 (delta 1)
remote: Resolving deltas: 100% (1/1)
remote: Processing changes: refs: 3, done
To ssh://admin@localhost:29418/project
! [remote rejected] origin/HEAD -> origin/HEAD (prohibited by Gerrit)
! [remote rejected] origin/master -> origin/master (prohibited by Gerrit)
! [remote rejected] origin/ref/for/master/testing -> origin/ref/for/master/testing (prohibited by Gerrit)
error: failed to push some refs to 'ssh://admin@localhost:29418/project'
I have already gone to the gerrit site and under project/access
added refs/head/*
Create Reference privileges for all users.
From my experience you need the following group permissions to import an entire repository to gerrit -- basically permissions to push everything to the gerrit repo:
In addition to adding the Create Reference privilege, you will also need to ensure that you have the direct push/force push privilege--creating a reference would involve creating a new branch, whereas updating an existing branch (namely, origin/HEAD
and origin/master
) will require the direct push/force push privilege (I have seen gerrit refer to this as both direct push and force push in the documentation).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With