-1

In the documentation of the Jenkins "Gerrit Trigger" plugin is written that is needed the following configuration in Gerrit:

Gerrit web interface > People > Create New Group : "Event Streaming Users". Add your jenkins user.

Admin > Projects > All-Projects > Access > Edit Global Capabilities Stream Events: ALLOW for Event Streaming Users

When trying to save the changes, e.g. adding "ALLOW for Event Streaming Users" I get an error from the Gerrit server:

Code Review - Error

Server Error

Unable to create new object: /home/gerrit2/gerrit-github-installation/git/All-Projects.git/objects/4c/3f6c52b57811228a96b41469517040487bb7b

It seems to be some access right at the server that are wrong but I can not figure out where I need to update. Note: I'm a Gerrit "administrator".

Vojtech Ruzicka
  • 16,384
  • 15
  • 63
  • 66
Anders Persson
  • 307
  • 1
  • 3
  • 17
  • Check which user executes the GerritCodeReview process (ps -elf | grep GerritCodeReview) and if this user has permission to create files in /home/gerrit2/gerrit-github-installation/git/All-Projects.git/objects. – Marcelo Ávila de Oliveira Nov 25 '16 at 10:41
  • Yes, that was the problem. The "gerrit2" user has access to the "objects" directory but the "4c" directory is owned by "root" and "gerrit2" does not have write permissions to that directory. – Anders Persson Nov 25 '16 at 11:05

1 Answers1

1

First of all: check if you are a Gerrit administrator, only administrators can change the access permissions of the All-Projects project. If you are not an administrator, ask to someone to do this for you.

Then: check which user executes the GerritCodeReview process (ps -elf | grep GerritCodeReview) and if this user has permission to create files in /home/gerrit2/gerrit-github-installation/git/All-Projects.gi‌​t/objects. If something is wrong, adjust the filesystem permission accordingly (chown or/and chmod commands).