Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RTC and Git Integration setup

I need to integrate Rational Team Concert and Git. I have to "plain" installations, a git installation on ubuntu including apache and an RTC installation on Windows and I have the article https://jazz.net/library/article/1479 in front of me.

Do you have any proposal of the port number, the document root folder I should use? Could anyone provide me a running apache config example?

Many thanks in advance
Cheers
Christine

1

0 votes


Accepted answer

Permanent link
 Here's an example apache conf file (simplified version of what we have used internally).

<VirtualHost *:8113>
   DocumentRoot /gitrepos/
   SetEnv GIT_PROJECT_ROOT /gitrepos/
   SetEnv GIT_HTTP_EXPORT_ALL 1
   SetEnv REMOTE_USER=$REDIRECT_REMOTE_USER
#   SSLEngine on
#   SSLCertificateFile  /certs/newCA.crt
#   SSLCertificateKeyFile /keys/newCA.key

   ScriptAliasMatch \
	"(?x)^/git/(.*/(HEAD | \
			info/refs | \
                        com\.ibm\.team\.git\.service\.GitResourceService/.* | \
			objects/(info/[^/]+ | \
				 [0-9a-f]{2}/[0-9a-f]{38} | \
				 pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
			git-(upload|receive)-pack))$" \
			/rtc-git-hooks/rtc-git-http-interceptor/$1
# Change the path above

#   ScriptAlias / /var/www/git/gitweb.cgi/

   <Directory "/usr/libexec/git-core/">
     Options +ExecCGI
     Allow from all
   </Directory>

   <Directory "/rtc-git-hooks/">
     Options +ExecCGI
     Allow from all
   </Directory>

   <Directory "/gitrepos/">
     Dav on
     Order allow,deny
     Allow from all
   </Directory>

   <LocationMatch "^/git/.*">
       Dav on
       AuthType Basic
       AuthBasicProvider ldap
       AuthName "Git"
       AuthLDAPURL "ldap://localhost:389/ou=people,dc=test,dc=lan?uid"
       Require valid-user
       Order allow,deny
       Allow from all
   </LocationMatch>

   #ProxyPass         /ccmgit  http://localhost:8080/ccmgit
   #ProxyPassReverse  /ccmgit  http://localhost:8080/ccmgit
</VirtualHost>

	
Christine Makasy selected this answer as the correct answer

1 vote

Comments

For some reason the strings '/' (forward slash) is getting replaced with '="' in the example above. So, you may have to manually search / replace this.


Many thanks for your examples. Now I have configured the environment as described, set up my "own" git server and  I have access from outside to my git repositories there. But registering a Git repository in RTC ccm shows me a communication error:  Invalid remote repository; reason = "Error communicating with Git server". Do you have a hint for the reason why. Thanks in advance

That is probably because you haven't filled the credentials to make requests to Git server. Fill them out in RTC repository registration page in the Settings tab.

Hello Christine,

the thing with "Authorize Git Requests" was the following:

if I authorize Git requests as admin, I got the error: HTTP Error 500: Internal Server Error but when I do that with a normal user account the rtc hooks ValidatePush.py & AssociateWorkitem.py will be executed without error but still no Links are created on the RTC side.

the reason is probabely the fact that some git2.dll ist needed

:https://www-01.ibm.com/support/knowledgecenter/SSYMRC_5.0.2/com.ibm.team.connector.cq.doc/topics/t_apache_http_server.html

-On Windows systems, edit rtc-git-interceptor.pl to configure the following variable $LIBGIT2_PATH ; The location where the libgit2 module is installed. For example: $LIBGIT2_PATH ="C:/libgit2/git2.dll".

my problem is that I don't find that dll as binary but only as sources, which should be compiled and to generate such dll.

my question is: is that the normal way to have some dll's respct. do you know where to get it?

thx

Adel

 Regarding the libgit2 library, I also wasn't able to find the pre-built binary for 0.21.0.


I found where the source code resides, got the source for 0.21.0, and was able to build it from source pretty easily. That was done on am Amazon Linux host. I'm not sure if building the library as a DLL on Windows is similarly easy.


One other answer

Permanent link
 Hi Christine

You can use any unused port, and if there is a firewall make sure you open it to be accessed outside the server.
I used the default port, 8080 which works fine and the document root as /var/www/html

Regards
Shubjit

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 2,357
× 97
× 7

Question asked: Apr 07 '15, 7:18 a.m.

Question was seen: 5,481 times

Last updated: Feb 26 '19, 9:47 a.m.

Confirmation Cancel Confirm