threads / discuss / 17487

Git over HTTPS

Subject: Git over HTTPS

## tl;dr

One message between Feb 1, 2009 and Feb 1, 2009.

replies: 0people: 1as markdown or json

Jason Wagner· Feb 1, 2009, 19:55 UTC · lore
I'm trying to set up a git repository on DAV on Apache, but having some trouble pushing via HTTPS.  I've set everything up according to the documentation-- http.sslVerify=false, .netrc setup, bare repository and update-server-info, etc.  The goal is to have read access available by http, but require authed https to write.  Here's the config I've been using:
Alias /public.git /var/git/public
<Location /public.git>
   DAV on
   Options +Indexes
#TEST    <LimitExcept GET PROPFIND OPTIONS>
#TEST       AuthType Basic
#TEST      AuthName "Git repository"
#TEST       AuthUserFile /var/git/public.git.httpusers
#TEST       Require valid-user
#TEST       SSLRequireSSL
#TEST     </LimitExcept>
</Location>

I turned off the LimitExcept for testing purposes. Inside of public is "logging", a git init --bare repository. When testing, I can do the following: git config repository.http.url http://jason@platinum/public.git/logging git config repository.https.url https://jason@platinum/public.git/logging

git pull http git push http # fresh local repository git pull https

When I do "git push https -f --all -v" after changing a single file, I get:
Pushing to https://jason@platinum/public.git/logging
Getting pack list
Fetching remote heads...
  refs/
  refs/heads/
  refs/tags/
updating 'refs/heads/master'
  from b8339306a895f5f18675116ab202b001cfbb95ce
  to   00d2d209b62f6f5322e943726b90bbf75f8a940a
Then it freezes until I ctrl-c it.  Sometimes the process stays around afterwards sometimes and needs a kill -9.

In the apache logs, I see the same requests coming in on both the http and https pushes. It seems to be locking on [01/Feb/2009:14:36:05 -0500] 127.0.0.1 TLSv1 RC4-MD5 "MKCOL /public.git/logging/refs/ HTTP/1.1" 321

or 
[01/Feb/2009:08:43:51 -0500] 127.0.0.1 TLSv1 RC4-MD5 "UNLOCK /public.git/logging/info/refs HTTP/1.1" -

I've done this on both git 1.5.6.6 and 1.6.2 to the same results. I'm using a fully updated Fedora 9 install on the server machine. Has anyone run into similar problems or have any suggestions? --- Jason Wagner

← back to recent threads