git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git access using SSL certificates

From
SPShantanu Pavgi <pavgi@uab.edu>
Date
Jun 28, 2010, 14:54 UTC
Message-ID
<CB7586D8-2C18-4BE9-9B32-3D02AA5F37ED@uab.edu>
Hi,
I have configured a bare Git repository over HTTPS and client needs to have a SSL certificate-key to access the repository. I am able to access this repository using Firefox by loading client certificate in the Firefox, but it is not working with git command line client. 
I tried setting http.sslCert and http.sslKey configuration options, but it is not working. Following were steps in accessing the repository. Am I missing something in my configuration? Any pointers on how to share git using SSL certificates would be really helpful. 

Thanks, Shantanu.

* Try git-clone using HTTPS without client certs 
{{{
mercury:tempgit-ssh2 shantanu$ git clone https://condor-node2.lab.ac.uab.edu/git/fifa2010 --verbose
Initialized empty Git repository in /Users/shantanu/tempgit-ssh2/fifa2010/.git/
error: Empty reply from server while accessing https://condor-node2.lab.ac.uab.edu/git/fifa2010/info/refs

fatal: HTTP request failed }}}

* Try git-clone using ssh
{{{
mercury:tempgit-ssh2 shantanu$ git clone ssh://ssp@condor-node2.lab.ac.uab.edu/srv/gitpubrepos/fifa2010 --verbose
Initialized empty Git repository in /Users/shantanu/tempgit-ssh2/fifa2010/.git/
ssp@condor-node2.lab.ac.uab.edu's password: 
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 7 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (7/7), done.
}}}
* Change git remote url 
{{{
mercury:fifa2010 shantanu$ git remote rm origin
mercury:fifa2010 shantanu$ git remote add origin https://condor-node2.lab.ac.uab.edu/git/fifa2010 
}}}
* Try git-pull with HTTPS without certs 
{{{
mercury:fifa2010 shantanu$ git pull
error: Empty reply from server while accessing https://condor-node2.lab.ac.uab.edu/git/fifa2010/info/refs

fatal: HTTP request failed }}}

* Try git-pull using certificates 
{{{
mercury:fifa2010 shantanu$ git config http.sslCert ~/Desktop/certs/usercerts/bob-svn/ssp.crt 
mercury:fifa2010 shantanu$ git config http.sslKey ~/Desktop/certs/usercerts/bob-svn/ssp.key 
mercury:fifa2010 shantanu$ git pull
error: Empty reply from server while accessing https://condor-node2.lab.ac.uab.edu/git/fifa2010/info/refs

fatal: HTTP request failed }}}

Next: Shantanu Pavgi
Message 1 of 5 in “git access using SSL certificates”
  1. Shantanu PavgiJun 28, 2010
  2. Shantanu PavgiJun 28, 2010
  3. Ilari LiusvaaraJun 28, 2010
  4. Shantanu PavgiJun 28, 2010
  5. Ilari LiusvaaraJun 29, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.