To use TeamForge Code Search functionality for Git, manually grant the TeamForge Code Search user permissions to access all Git repositories.
In TeamForge 6.2 (and later versions), Code Search functionality is available through integration with Black Duck Code Sight.
To be able to access the Gerrit console directly from TeamForge, you'll need to set it up as a linked application.
You need the root user's public key for SSH authentication on the Code Search server.
Do the following:
- On the Code Search box, check whether the key is present at /root/.ssh/id_rsa.pub. If not, generate it by running the ssh-keygen command.
- Copy it to a temporary location (/tmp) on the TeamForge application server.
Run the set_auth_key.py script for the scmviewer
user on the TeamForge
- cd /opt/collabnet/teamforge/runtime/scripts/codesearch/
- ./set_auth_key.py --authkey-file=/tmp/id_rsa.pub
Sync the scmviewer user to Gerrit by running the following command in
a shell on the host where you installed the Git integration.
- curl http://localhost:9081/api/gerrit/users/scmviewer/sshkeys
Log into the Gerrit console as a Gerrit super user and create an internal Gerrit group,
for example, "CodeSight Group".
- Add the scmviewer user to the group.
Grant read access to the group.
- In the Gerrit project page that displays access rights, select Read Access for Category.
- For Group Name, enter the name of the internal group ("CodeSight" in the example) you created.
- Enter "refs/*" for Reference Name.
- Enter "+1:Read Access" for Permitted Rage.
- Click Add Access Right.
- Log out from Gerrit.
Restart the Code Search server.
- /etc/init.d/collabnet restart tomcatcs