Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8959573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:28:26+00:00 2026-06-15T15:28:26+00:00

I’m trying to host a Git repo using Nginx 0.8.52, with fcgiwrap wrapping git-http-backend

  • 0

I’m trying to host a Git repo using Nginx 0.8.52, with fcgiwrap wrapping git-http-backend. However, I constantly receive the following error (note the error at the end):

HGs-MacBook-Pro:git_dev hg$ GIT_CURL_VERBOSE=1 git push production master
* Couldn't find host git.example.org in the .netrc file; using defaults
* About to connect() to git.example.org port 443 (#0)
*   Trying 111.222.333.444...
* Connected to git.example.org (111.222.333.444) port 443 (#0)
* Connected to git.example.org (111.222.333.444) port 443 (#0)
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
*    subject: C=GB; ST=Berkshire; L=Newbury; O=My Company Ltd
*    start date: 2012-11-27 09:56:30 GMT
*    expire date: 2012-12-27 09:56:30 GMT
*    issuer: C=GB; ST=Berkshire; L=Newbury; O=My Company Ltd
*    SSL certificate verify result: self signed certificate (18), continuing anyway.
> GET /info/refs?service=git-receive-pack HTTP/1.1
User-Agent: git/1.7.11.4
Host: git.example.org
Accept: */*
Pragma: no-cache

< HTTP/1.1 401 Unauthorized
< Server: nginx
< Date: Thu, 29 Nov 2012 01:42:21 GMT
< Content-Type: text/html
< Content-Length: 188
< Connection: close
< WWW-Authenticate: Basic realm="Restricted"
< 
* Closing connection #0
* Issue another request to this URL: 'https://admin@git.example.org/info/refs?service=git-receive-pack'
* Couldn't find host git.example.org in the .netrc file; using defaults
* About to connect() to git.example.org port 443 (#0)
*   Trying 111.222.333.444...
* Connected to git.example.org (111.222.333.444) port 443 (#0)
* Connected to git.example.org (111.222.333.444) port 443 (#0)
* SSL re-using session ID
* SSL connection using DHE-RSA-AES256-SHA
* old SSL session ID is stale, removing
* Server certificate:
*    subject: C=GB; ST=Berkshire; L=Newbury; O=My Company Ltd
*    start date: 2012-11-27 09:56:30 GMT
*    expire date: 2012-12-27 09:56:30 GMT
*    issuer: C=GB; ST=Berkshire; L=Newbury; O=My Company Ltd
*    SSL certificate verify result: self signed certificate (18), continuing anyway.
* Server auth using Basic with user 'admin'
> GET /info/refs?service=git-receive-pack HTTP/1.1
Authorization: Basic YWRtaW46
User-Agent: git/1.7.11.4
Host: git.example.org
Accept: */*
Pragma: no-cache

< HTTP/1.1 401 Unauthorized
< Server: nginx
< Date: Thu, 29 Nov 2012 01:42:24 GMT
< Content-Type: text/html
< Content-Length: 188
< Connection: close
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="Restricted"
* The requested URL returned error: 401
* Closing connection #0
Password for 'https://admin@git.example.org': 
* Couldn't find host git.example.org in the .netrc file; using defaults
* About to connect() to git.example.org port 443 (#0)
*   Trying 111.222.333.444...
* Connected to git.example.org (111.222.333.444) port 443 (#0)
* Connected to git.example.org (111.222.333.444) port 443 (#0)
* SSL re-using session ID
* SSL connection using DHE-RSA-AES256-SHA
* old SSL session ID is stale, removing
* Server certificate:
*    subject: C=GB; ST=Berkshire; L=Newbury; O=My Company Ltd
*    start date: 2012-11-27 09:56:30 GMT
*    expire date: 2012-12-27 09:56:30 GMT
*    issuer: C=GB; ST=Berkshire; L=Newbury; O=My Company Ltd
*    SSL certificate verify result: self signed certificate (18), continuing anyway.
* Server auth using Basic with user 'admin'
> GET /info/refs?service=git-receive-pack HTTP/1.1
Authorization: Basic REMOVED
User-Agent: git/1.7.11.4
Host: git.example.org
Accept: */*
Pragma: no-cache

* The requested URL returned error: 404
* Closing connection #0
* Couldn't find host git.example.org in the .netrc file; using defaults
* About to connect() to git.example.org port 443 (#0)
*   Trying 111.222.333.444...
* Connected to git.example.org (111.222.333.444) port 443 (#0)
* Connected to git.example.org (111.222.333.444) port 443 (#0)
* SSL re-using session ID
* SSL connection using DHE-RSA-AES256-SHA
* old SSL session ID is stale, removing
* Server certificate:
*    subject: C=GB; ST=Berkshire; L=Newbury; O=My Company Ltd
*    start date: 2012-11-27 09:56:30 GMT
*    expire date: 2012-12-27 09:56:30 GMT
*    issuer: C=GB; ST=Berkshire; L=Newbury; O=My Company Ltd
*    SSL certificate verify result: self signed certificate (18), continuing anyway.
* Server auth using Basic with user 'admin'
> GET /info/refs HTTP/1.1
Authorization: Basic REMOVED
User-Agent: git/1.7.11.4
Host: git.example.org
Accept: */*
Pragma: no-cache

< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 29 Nov 2012 01:42:32 GMT
< Content-Type: text/plain
< Connection: close
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< Content-Length: 59
< 
* Closing connection #0
* Couldn't find host git.example.org in the .netrc file; using defaults
* About to connect() to git.example.org port 443 (#0)
*   Trying 111.222.333.444...
* Connected to git.example.org (111.222.333.444) port 443 (#0)
* Connected to git.example.org (111.222.333.444) port 443 (#0)
* SSL re-using session ID
* SSL connection using DHE-RSA-AES256-SHA
* old SSL session ID is stale, removing
* Server certificate:
*    subject: C=GB; ST=Berkshire; L=Newbury; O=My Company Ltd
*    start date: 2012-11-27 09:56:30 GMT
*    expire date: 2012-12-27 09:56:30 GMT
*    issuer: C=GB; ST=Berkshire; L=Newbury; O=My Company Ltd
*    SSL certificate verify result: self signed certificate (18), continuing anyway.
* Server auth using Basic with user 'admin'
> GET /HEAD HTTP/1.1
Authorization: Basic REMOVED
User-Agent: git/1.7.11.4
Host: git.example.org
Accept: */*
Pragma: no-cache

< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 29 Nov 2012 01:42:36 GMT
< Content-Type: text/plain
< Connection: close
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, max-age=0, must-revalidate
< Content-Length: 23
< Last-Modified: Wed, 28 Nov 2012 12:09:23 +0000
< 
* Closing connection #0
Password for 'https://admin@git.example.org': 
* Couldn't find host git.example.org in the .netrc file; using defaults
* About to connect() to git.example.org port 443 (#0)
*   Trying 111.222.333.444...
* Connected to git.example.org (111.222.333.444) port 443 (#0)
* Connected to git.example.org (111.222.333.444) port 443 (#0)
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
*    subject: C=GB; ST=Berkshire; L=Newbury; O=My Company Ltd
*    start date: 2012-11-27 09:56:30 GMT
*    expire date: 2012-12-27 09:56:30 GMT
*    issuer: C=GB; ST=Berkshire; L=Newbury; O=My Company Ltd
*    SSL certificate verify result: self signed certificate (18), continuing anyway.
> PROPFIND / HTTP/1.1
User-Agent: git/1.7.11.4
Host: git.example.org
Accept: */*
Depth: 0
Content-Type: text/xml
Content-Length: 161
Expect: 100-continue

< HTTP/1.1 401 Unauthorized
< Server: nginx
< Date: Thu, 29 Nov 2012 01:42:43 GMT
< Content-Type: text/html
< Content-Length: 188
< Connection: close
< WWW-Authenticate: Basic realm="Restricted"
< 
* Excess found in a non pipelined read: excess = 188 url = / (zero-length body)
* Closing connection #0
* Issue another request to this URL: 'https://admin@git.example.org/'
* Couldn't find host git.example.org in the .netrc file; using defaults
* About to connect() to git.example.org port 443 (#0)
*   Trying 111.222.333.444...
* Connected to git.example.org (111.222.333.444) port 443 (#0)
* Connected to git.example.org (111.222.333.444) port 443 (#0)
* SSL re-using session ID
* SSL connection using DHE-RSA-AES256-SHA
* old SSL session ID is stale, removing
* Server certificate:
*    subject: C=GB; ST=Berkshire; L=Newbury; O=My Company Ltd
*    start date: 2012-11-27 09:56:30 GMT
*    expire date: 2012-12-27 09:56:30 GMT
*    issuer: C=GB; ST=Berkshire; L=Newbury; O=My Company Ltd
*    SSL certificate verify result: self signed certificate (18), continuing anyway.
* Server auth using Basic with user 'admin'
> PROPFIND / HTTP/1.1
Authorization: Basic REMOVED
User-Agent: git/1.7.11.4
Host: git.example.org
Accept: */*
Depth: 0
Content-Type: text/xml
Content-Length: 161
Expect: 100-continue

< HTTP/1.1 100 Continue
* We are completely uploaded and fine
* The requested URL returned error: 404
* Closing connection #0
error: Cannot access URL https://admin@git.example.org/, return code 22
fatal: git-http-push failed

The backend fcgiwrap also complains in the log as follows:

Request not supported: '/home/admin/repo/info/refs?service=git-receive-pack'

During that same period, Nginx reports error logs of the following (which appears normal given the requests that Git push is sending):

2012/11/29 09:52:42 [error] 15091#0: *3257838 no user/password was provided for basic authentication, client: 222.055.121.111, server: git.example.org, request: "GET /info/refs?service=git-receive-pack HTTP/1.1", host: "git.example.org"
2012/11/29 09:52:45 [error] 15092#0: *3257989 user "admin": password mismatch, client: 222.055.121.111, server: git.example.org, request: "GET /info/refs?service=git-receive-pack HTTP/1.1", host: "git.example.org"
2012/11/29 09:53:02 [error] 15090#0: *3258816 no user/password was provided for basic authentication, client: 222.055.121.111, server: git.example.org, request: "PROPFIND / HTTP/1.1", host: "git.example.org"

For the sake of completeness, here is the relevant portion of nginx.conf:

# Git
server {
    listen 80;
    listen 443 ssl;
    server_name git.example.org;

    access_log  /home/admin/repo.deploy.log combined;
    ssl_certificate /etc/nginx/git.myserver.org.self.crt;
    ssl_certificate_key /etc/nginx/git.myserver.org.self.key;

    location / {
        auth_basic  "Restricted";
        auth_basic_user_file /etc/nginx/nginx.htpasswd;

        include fastcgi_params;

        fastcgi_param SCRIPT_FILENAME /usr/libexec/git-core/git-http-backend;
        fastcgi_param GIT_HTTP_EXPORT_ALL "";
        fastcgi_param GIT_PROJECT_ROOT /home/admin/repo/;
        fastcgi_param PATH_INFO $request_uri;

        fastcgi_pass 127.0.0.1:9001;
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:28:27+00:00Added an answer on June 15, 2026 at 3:28 pm

    The answer to this question is PATH_INFO was expecting $uri not $remote_uri

    Replacing:

    fastcgi_param PATH_INFO $request_uri;

    with

    fastcgi_param PATH_INFO $uri;

    Fixed the problem. I also added fastcgi_param REMOTE_USER $remote_user; as I was using http authentication.

    So it should look like this:

    # Git
    server {
        listen 80;
        listen 443 ssl;
        server_name git.myserver.org;
    
        access_log  /home/admin/repo.deploy.log combined;
        ssl_certificate /etc/nginx/git.myserver.org.self.crt;
        ssl_certificate_key /etc/nginx/git.myserver.org.self.key;
    
        location / {
            auth_basic  "Restricted";
            auth_basic_user_file /etc/nginx/nginx.htpasswd;
    
            include fastcgi_params;
    
            fastcgi_param SCRIPT_FILENAME /usr/libexec/git-core/git-http-backend;
            fastcgi_param GIT_HTTP_EXPORT_ALL "";
            fastcgi_param GIT_PROJECT_ROOT /home/admin/repo/;
            fastcgi_param PATH_INFO $uri;
            fastcgi_param REMOTE_USER $remote_user;
    
            fastcgi_pass 127.0.0.1:9001;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to render a haml file in a javascript response like so:
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.