General usage questions about the TeamForge Git integration.
- What are the next steps after the post-installation script runs?
- After running the post-installation script, first create an SCM repository of type Git in your TeamForge project. Then add at least one project role with SCM permissions to access that repository and assign that role to one or more users. With the appropriate credentials (uploaded authorized keys) and the clone URL provided in the Source Code page, users will be able to clone the Git repository.
- I am a site admin/project admin/have global SCM permissions/looking at a public project. Why can't I access a newly created repository from the TeamForge web interface or clone it using my Git client?
- A new project role with source code permissions must exist. A user needs this role to access the repository from the TeamForge web interface. Project administrator rights, site administrator rights, global roles, and default access permissions for project membership are currently ignored by the Git integration.
- I've created a Git repository but it does not show up in Gerrit. Why might this happen?
- TeamForge repositories are synched only if there is at least one project role with SCM permissions in the corresponding TeamForge project. Once you create such a project role, the synch should happen, and the repository should appear as a project in Gerrit.
- How can I log into Gerrit?
- If your administrator has set up Gerrit as a linked application to TeamForge, you will automatically be logged into Gerrit (SSO) when you click its link. If not, access the URL http(s)://<yourtfinstance>/scm integration server>/gerrit/ and provide your TeamForge credentials.
- What are the Git protocols that work with Git repositories managed by TeamForge?
- The Git integration currently allows you to access a Git repository using SSH.
That said, you must have generated an SSH key pair and uploaded the SSH public
key to TeamForge in
> Authorized keys
Alternatively, you can use http(s) to clone and push to Git repositories.Note: Use this option only if SSH is not available to you.To enable http(s) access, log into Gerrit and generate an HTTP password ( Settings > HTTP Password > Generate Password ). This password will not match your TeamForge password; you'll need to provide it to your Git client whenever you perform an operation that requires accessing the Git server. The clone URL for http(s) access follows the this convention:
git clone https://$USERNAME@<yourtfinstance/scm integration server>/gerrit/p/<TFreponame>
- How do I generate an SSH key pair?
- You can generate an SSH key pair on a Unix machine by running the following
- $ ssh-keygen -t rsa
- After installing a Git client, I am able to clone a Git repository into my local work directory. However, I am not able to "push" anything to the remote repository in spite of having view and commit permissions. What should I do ?
- Right after you clone, but before you commit any changes locally, you will need
to configure Git if you haven't already.
- $ git config --global user.name "<TeamForge username>"
- $ git config --global user.email "<email used in TeamForge for the user>"
- I've changed /appended my public key in TeamForge. Will I still be able to access a Git repository using the new SSH key pair?
- Yes, when you change your authorized key in TeamForge, it gets synced instantly with the Git integration. So you should be able to access you Git repository using a new key pair.
- Is a commit association created in TeamForge after I push my commit to a remote Git repository?
- Yes, when you push a local commit to the remote repository, an association will
get created if the commit message contains a reference to a TeamForge item such as a tracker artifact,
wiki or document. Note: A commit association will not be created if you push your commit to Gerrit's "review branch" (push for review).
- What happens if the TeamForge site is down or there are some network problems -- will the Git integration still work?
- The Git integration will still work, but with the following limitations:
- If the TeamForge site is down, users will not be able to see commit associations created in TeamForge, but still be able to push commits to a Git repository.
- If the Git integration is hosted in LOCAL mode, network-related problems would definitely prevent changes being pushed to a Git repository.
- If the Git integration is hosted in REMOTE mode, the synchronization of roles and permissions will be cached during the period when TeamForge is down; Git will function with the roles and permissions synched already.
- What is a "Jumbo Push"?
- In contrast to Subversion, Git has the concept of local commits that stay in the local environment of a user, and at some point, get pushed to a remote repository all at once. This push checks in changes from all commits into the remote repository. For each of those commits, a commit object appears in the TeamForge (Source Code component). So, one push can have an unlimited number of commits and thus commit objects in TeamForge. You can, however, define the threshold for a single push based on how many commits should generate a commit object. A push' containing commits beyond that threshold is called a "Jumbo Push"'. You can configure the Jumbo Push threshold by running the post-installation script.
- What objects and relationships are mapped between TeamForge and the Git integration?
- See the README (APPENDIX, Relationship and Object mapping section) or TeamForge Git integration reference.
- When are the objects and relationships synchronized between TeamForge and the Git Integration?
TeamForge project roles, project role
SCM permissions, global groups, SCM repositories, and global group/project role
membership are synched in two ways:
- Synchronously: after a regular interval (configurable using the post-installation script)
- Asynchronously: whenever there is a change related to roles or permissions within TeamForge, it triggers the sync between TeamForge and the Git integration.
TeamForge users are provisioned in Gerrit whenever you -
Note: Changes in Gerrit are not synched back to TeamForge.
- Change their authorized keys in TeamForge
- Log into Gerrit by clicking the linked application link or using TeamForge username and password
- Access GitWeb (web interface for a Git repository) by clicking a Git repository link in the TeamForge Source Code page
- Where can I find system logs for the Git integration?
- You can find the logs under /opt/collabnet/gerrit/logs/. For more on log files, refer to the README or TeamForge Git integration reference.
- Can I bypass Gerrit and access a Git repository directly?
- No, Gerrit is used to enforce TeamForge access permissions.
- TeamForge 6.2 supports an integration with Black Duck Code Sight. Does this work with Git?
- Yes. See Set up Code Search for the TeamForge Git integration for more information.
- I deleted a TeamForge Git SCM repository but the corresponding Gerrit project does not get deleted. What's wrong?
- Currently, Gerrit does not allow removing projects that are created already (so that you don't easily lose source code). One implication of this behavior is that even though you deleted the corresponding TeamForge repository, you will not be able to create a new one with the same directory name.
- How can I import an existing Git repository into Gerrit?
- As long as all the commits in the repository are yours and there is a linear history, a force push should be sufficient. Otherwise, you would have to go into Gerrit and manually add permissions to push commits authored by other individuals and merge commits.
- In the TeamForge web interface, I see the repository root parameter for Git set to "/tmp". Can I change that?
- For backward compatibility reasons, this parameter has to be set to "/tmp". It does not affect where Gerrit actually stores its Git repositories -- this is at /gitroot.
- Do we have default hook scripts available for Git in TeamForge?
- Associating artifacts based on commit messages and blocking commits without a commit message is a core TeamForge mechanism that
is supported by Git as well.
To add hook scripts, see http://gerrit-documentation.googlecode.com/svn/ Documentation/2.1.7/config-hooks.html.
- Do we have email alerts for Git in TeamForge? If yes, where do we configure it?
- Email alerts based on TeamForge commits is a core TeamForge feature, independent of the SCM involved. In addition, Gerrit sends out review emails using the SMTP server specified during installation (it defaults to the TeamForge SMTP server). The mail template is explained in http://gerrit-documentation.googlecode.com/svn/Documentation/2.1.7/config-mail.html.
- Do we have Role Based Access Control and Path Based Permissions for Git in TeamForge?
- We support all SCM permission cluster options for TeamForge project roles. Only TeamForge project roles are considered; default access permissions, global roles, project membership, site admin and project admin permissions are ignored. Path-based permissions are not relevant in Git since a Git commit always contains all files. If we did not ship certain files this would result in a checksum error. Gerrit supports branch-based permissions but this feature is currently not directly exposed over the TeamForge web interface.