The Gitweb projects must be registered with the adapter.
Before you begin
The Gitweb server
is registered with the adapter.
Restriction: Special
characters in your Git project name might cause problems when the
project is registered or commit links are created or traversed. You
can check your Git project name by comparing the encoded URL for the
Git project summary page with the original Git project name. For example,
the Gitweb project JKE+Banking.git summary page has
an encoded URL of http://our.git.server/git/?p=JKE%2BBanking.git;a=summary,
where the + sign is replaced with %2B.
Support is provided for a space or forward slash in the Git project
name. Otherwise, remove any special characters from your Git project
name before you register the project. If your Git project name contains
spaces, the spaces are automatically handled as plus signs if you
use the Register This Project menu action from
the Rational® Adapter for
Git banner in Gitweb. If you are adding Git projects directly in the
Git adapter administration page (using the Add link on the Git
Server Connections page), you must manually replace the
spaces with plus signs when you type the Git Project Name.
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
- 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.
- From the Gitweb home page, go to a project page.
- Click the Admin (Administration)
icon in the upper right portion of the banner and then click Register
This Project.

The Register Git Project page
opens in a new web browser window.
- Confirm that the Git Project Name contains
the project name that you want to register.
- Optional: Add a summary.
- Associate the project with a Rational Team Concert project.
- Click Add.
- 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.
.gif)
- Click Associate Projects.
- Click Register.
- 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.
- Configure the receive hook for your registered project.
- Click Receive Hook
- 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.
- 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.

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.