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

Git-RTC-Integration

 I started GIT Integration with RTC and

at the moment I have the following situation:

I initialize a repository in ~Apache24\htdocs and I can see it on my localhost,

But when trying to fetch it to my local git repository I got following errors:

$ GIT_CURL_VERBOSE=1 git pull origin master
* Couldn't find host localhost in the _netrc file; using defaults
*   Trying ::1...
* Connected to localhost (::1) port 80 (#0)
> GET /project.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.9.5.msysgit.1
Host: localhost
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

< HTTP/1.1 404 Not Found
< Date: Wed, 15 Jul 2015 12:08:30 GMT
< Server: Apache/2.4.12 (Win32) OpenSSL/1.0.1m
< X-Distributor: AHC
< Content-Length: 219
< Content-Type: text/html; charset=iso-8859-1
<
* Connection #0 to host localhost left intact
fatal: repository 'http://localhost/project.git/' not found

0 votes



4 answers

Permanent link
It sounds like the httpd.conf has not been configured correctly with the locationmatch directive.  See the following article for details
https://jazz.net/library/article/1426

0 votes

Comments

Hi Abraham,

I changed my httpd.conf (Listen 8080) so that when I put

http://localhost:8080/project.git

in the Browser I can see my project tree.

but above error does still occur when I execute following fetch command:

$GIT_CURL_VERBOSE=1 git fetch http://git@localhost/project.git

Any Idea why this happens?

 

thx

Adel


Permanent link
Hi Adel,

Its not resolving the localhost using push command git registry project hosts,

* Verify the virtual host entry to the port you wish the Apache to open for servicing Git requests.

* Please have a check on the hooks information is updated with the right repo keys and try checking the right host name

https://jazz.net/library/article/1479

Regards,
Arun.


0 votes

Comments

Hi Arun,

my last status concerning the RTC Git Integration is that the Push doesn't work correctly I got following error message:

('Executing command: ', ['git', 'rev-parse', '--git-dir'])
('getValidatePushUrl(): Could not switch to git repository path',)
'Push Operation' failed. Preconditions have not been met: "Owner of the Git commit is null or does not match the Git user."

any Idee where ist the problem?

thx

Adel


Permanent link
@Adel Salah, Did you fixed this issue? I am also having the same error while git and rtc integration. What was the solution for this?

Thanks

0 votes


Permanent link
 Hello Naveen,

RTC hooks (Validate and Associate WorkItems)

2 Python scripts should be executed with the appropriate parameters to validate and associate a workitem with a Git commit ID as following (also from the Git repository to which many users are pushing their changes to)

ValidatePush.py "rtcRepositoryUrl" " rtcRepositoryKey" "userId" "localSha1" "remoteSha1"  "remoteRef"

AssociateWorkitem.py "rtcRepositoryUrl" " rtcRepositoryKey" "userId" "localSha1" "remoteSha1"  "remoteRef"

Parameters:

rtcRepositoryUrl: Url of the RTC server to communicate. (Example: https://myrtc:9443/ccm/)

                          NOTE: Starting with 5.0.2 release, this variable is deprecated (and, would be removed from

                          this script in a future release). The repository URL is expected to be a config property

                          'rtc.repourl') of the corresponding Git repository. However, if it is not defined, we fall back on

                          to this value. Hence, this value is required as of 5.0.2 release.

                          (Implies that in case of differing values between this variable and the config property of

                          that repository, the config value takes precedence)

 

 gitRepositoryKey: The key that was generated in RTC for this Git repository while registering.

                           NOTE: Starting with 5.0.2 release, this variable is deprecated (and, would be removed from

                           this script in a future release). The repository URL is expected to be a config property

                           ('rtc.repokey') of the corresponding Git repository. However, if it is not defined, we fall back

                           on to this value. Hence, this value is required as of 5.0.2 release.  (Implies that in case of

                           differing values between this variable and the config property of that repository, the config

                           value takes precedence)

 

userId: The id of the RTC user to validate against. In an Apache HTTP server environment it is the value of the

            variable $REDIRECT_REMOTE_USER

           

localSha1: The value of the base reference value (previous Commit-ID of the current element/version)

 remoteSha1: The value of the end reference value (current Commit-ID of the current element/version)

remoteRef: The value of the remote reference

Example in our case:

 

c:\Programme\Apache24\htdocs\project.git>python.exe C:\Programme\RTC-GIT-Hooks-5.0.2\ValidatePush.py "https://clm.xxxxx.local:9443/ccm" "08eb28aacd7b4454bd88bf4c11f25076" "user" "dc5a2857387278f1bced7782c3615c0c3489fa43" "52f740fcc47f91639f59662b1bc866fd7d3b28f7"  "master"

c:\Programme\Apache24\htdocs\project.git>python.exe C:\Programme\RTC-GIT-Hooks-5.0.2\AssociateWorkitem.py "https://clm.xxxxx.local:9443/ccm" "08eb28aacd7b4454bd88bf4c11f25076" "user" "dc5a2857387278f1bced7782c3615c0c3489fa43" "52f740fcc47f91639f59662b1bc866fd7d3b28f7"  "master


hope this helps.

BR

Adel

0 votes

Comments

Hi Adel, Yes, I have those 2 scripts and pre-condition hook calling while pushing the git code. But still getting the error "Push Operation' failed. Preconditions have not been met: "Owner of the Git commit is null or does not match the Git user."

I have those 2 script you mentioned and mentioned the path in pre-confidtion to configure rtc and git. Is there anything that I am missing? You also got the same error Last yr . what did you do for fix?

Thanks

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
× 97

Question asked: Jul 15 '15, 9:50 a.m.

Question was seen: 3,273 times

Last updated: Aug 08 '16, 2:44 p.m.

Confirmation Cancel Confirm