To use TeamForge Code Search functionality
for Git, manually grant the TeamForge Code Search user
permissions to access all Git repositories.
-
You need the root user's public key for SSH authentication on the Code Search server.
Do the following:
-
Log in to
the
Black
Duck Code Sight Server and
check
whether the key is present at /root/.ssh/id_rsa.pub. If not,
generate it by running the ssh-keygen command.
-
Run the set_auth_key.py script for the scmviewer
user on the Black Duck Code Sight Server.
-
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 the 'scmadmin' user and create an internal Gerrit group,
for example, 'CodeSight Group'.
-
Select .
The Create Group page appears.
-
Type a name for the group, for example, 'CodeSight Group', and click
Create Group.
The group is created.
-
Add the scmviewer user to the group.
Type Code Search <scmviewer@localhost> user name in the
Members text box and click Add.
-
Grant read access to the group.
-
Select .
-
Select and click Edit.
-
Click Add Group in the section, type the newly created group name, for example, 'CodeSight
Group', and click Add.
-
Click Save Changes.
-
Log out from Gerrit.
-
Restart the Code Search server.
- /opt/collabnet/teamforge/bin/teamforge
restart