Teamforge-Git integration: Technical concepts FAQ

Questions on some of the Teamforge-Git integration's more technical aspects.

What does the directory structure look like for a Git integration?
See the README or Gerrit directory structure, connectivity and more.
Where can I find more information about Gerrit?
For more information on Gerrit, see the Gerrit Community Documentation page.
Which ports does the Git Integration use? My organization has a strict firewall policy, and I need to know which ports to make available for the Git integration.
The Git integration uses 3 ports: 9080,9081, and 29418. See the README or Gerrit directory structure, connectivity and more for more information. For the integration, Git integration uses 3 ports(9080,9081,29418 follow details in README) Only port 29418 should be exposed by the firewall.
I get a delay whenever I do a Git push, but not when I do a Git fetch. What is wrong?
When you do a Git push, Gerrit tries to do a reverse lookup of your IP address. If the nameserver configured for your Git integration server cannot do this reverse lookup, it will result in a timeout. You need to configure your nameserver list (/etc/resolv.conf) correctly. For further information, see this core Java bug.
I ran Gerrit manually (without the service script; now my secure config file is gone and Gerrit does not start up. What happened and how can I fix this?
If Gerrit is run with a different Unix user than gerrit, newly created and modified files may not belong to the gerrit user any longer. As a consequence, when you try to restart Gerrit using its services script (which switches to the gerrit user), Gerrit might not start up due to wrong file permissions. If Gerrit detects that the permissions of its secure config file have been tampered with, it even removes this file. You should, therefore, only run Gerrit using the service script provide, and reconfigure it by running the post-install script again. You can fix incorrect permissions by running the following (as sudo or root):
chown -R gerrit.gerrit /opt/collabnet/gerrit
I deleted the dedicated Teamforge Gerrit user account in TeamForge, and SCM permission synch is no longer working. How can I recover from this situation?
  • The easy, and recommended, approach is to ask CollabNet's Professional Services to undelete the TeamForge user in question.
  • Otherwise, you would have to create a new dedicated site admin user in TeamForge, shut down Gerrit, re-run the post-install script and provide the credentials of that user. Then, you would have to start Gerrit again, and log in with as that new user via the web interface. You will see that the user does not have any special admin permissions. If you still have a working user in Gerrit's administrator group, you could add the dedicated Gerrit user to that group using Gerrit's web interface. If not, you would have to manually add the new user to the Gerrit administrator group by shutting down Gerrit, removing all files from its caching directory, inserting the user id of the new user into Gerrit's Postgres reviewdb DB group/user membership table, and starting Gerrit again. Since this probably requires you to consult CollabNet's Professional Services as well, we strongly recommend the previous option (undeleting the previously removed user).
Why does the Registered Users group has StreamEvents capability in Git Integration v8.1.x by default?
  • As Gerrit 2.7 Stream Events capability is required for user whose account has been used to monitor Gerrit Events on repositories hosted on Gerrit.
  • As Jenkins Gerrit Trigger plug-in uses such a capability to monitor Gerrit events.
  • If you have been using Jenkins CI with Gerrit Trigger plug-in to automatically verify code review request and already upgraded to Git Integration v8.1.x, the Registered Users group has been given this capability by default. Therefore, you do not need add this capability manually and your Jenkins CI with Gerrit Trigger continues to function as usual.
  • In case you’re using Jenkins CI with Gerrit Trigger plug-in, you may remove the Stream Events capability as a user who is part of the Gerrit Administrators group.
    • To remove Stream Events:
      1. Log on to Gerrit web UI.
      2. Select the Projects tab.
      3. Select All Projects > Access.
      4. Click Edit.
      5. Delete the Stream Events drop-down list.
      6. Click Save Changes