Git-RTC-Integration
![](http://jazz.net/_images/myphoto/036d07d7ceb42779e15e38bf8965dce8.jpg)
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
4 answers
![](http://jazz.net/_images/myphoto/036d07d7ceb42779e15e38bf8965dce8.jpg)
https://jazz.net/library/article/1426
Comments
![](http://jazz.net/_images/myphoto/036d07d7ceb42779e15e38bf8965dce8.jpg)
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
![](http://jazz.net/_images/myphoto/036d07d7ceb42779e15e38bf8965dce8.jpg)
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.
Comments
![](http://jazz.net/_images/myphoto/036d07d7ceb42779e15e38bf8965dce8.jpg)
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
![](http://jazz.net/_images/myphoto/036d07d7ceb42779e15e38bf8965dce8.jpg)
Thanks
![](http://jazz.net/_images/myphoto/036d07d7ceb42779e15e38bf8965dce8.jpg)
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
Comments
![](http://jazz.net/_images/myphoto/54ab8443d6b23e4d265b8d5798f55806.jpg)
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