Registering Gitweb projects

The Gitweb projects must be registered with the adapter.

About this task

You register a Gitweb project with the adapter. You must be logged in as a Rational Team Concert™ user with administrator or project administrator privileges. Repeat this procedure for each project you want to register.

Procedure

  1. Point your web browser to the Gitweb home page. For example, http://our.git.server/git

    The Rational Adapter for Git banner shows. The banner is one of the Gitweb additions that you deployed to the Gitweb server.

  2. From the Gitweb home page, go to a project page.
  3. Click the Admin (Administration) icon in the upper right portion of the banner and then click Register This Project.

    The Register This Project selection from the administration icon in the banner.

    The Register Git Project page opens in a new web browser window.

  4. Confirm that the Git Project Name contains the project name that you want to register.
  5. Optional: Add a summary.
  6. Associate the project with a Rational Team Concert project.
    1. Click Add.
    2. In the Associate Rational Team Concert Projects window, select the check box next to the Rational Team Concert project or projects that you want to associate this Gitweb project with.

      Associate Rational Team Concert Projects with the Git project that you are registering with the adapter.

    3. Click Associate Projects.
  7. Click Register.
  8. The Gitweb project is registered with the adapter. Further instructions direct you to configure the hooks that automate the creation of links when commits are pushed to the registered Gitweb project. Note the registered Gitweb project URL. The registered Gitweb project URL is required to install and configure the receive hook for the project.
  9. Configure the receive hook for your registered project.
    1. Click Receive Hook
    2. Add change request tags and separate each one with a comma. For example, bug, task

      The adapter checks for these tags in the commit message to determine whether a link to a work item can be created.

    3. Add branch names and mark them as include or exclude to limit which branches the Git receive hook applies to. You can use the * glob pattern to match zero or more characters in a branch name. The adapter reviews all of the globs, and the last glob to match the branch name applies. For example, if you have a branch named bug180 and include bug1* and then exclude bug18*, the adapter excludes the branch named bug180 because the last glob to match the branch name applies.

    Add receive hook options for a registered Git project

    When a user clicks a link from an Rational Team Concert work item to a Git commit, the Git URL Format is used to reconstruct the URL of the Git commit and redirect the request. The default value is <server>?p=<project>;a=commit;h=<sha1>

Results

The Gitweb project is registered with the adapter.

What to do next

Configure the Git receive hook for the Gitweb project, see Deploying the receive hook for Gitweb.

Feedback