Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #5774

Closed
Open
Created Dec 06, 2013 by Administrator@rootOwner

http clone doesnt work over nginx(gitlab latest master)

Created by: pgroot

GitLab version 6.4.0
nginx version 1.0.15

nginx conf

upstream gitlab {
  server 127.0.0.1:8080;
}
server {
    listen *:80;
    listen *:12345;
    server_name 192.168.1.101;
    server_tokens off;
    root /home/git/gitlab/public;
    client_max_body_size 100m;
    access_log  /var/log/nginx/gitlab_access.log;
    error_log   /var/log/nginx/gitlab_error.log;
    location / {
        try_files $uri $uri/index.html $uri.html @gitlab;
    }
    location @gitlab {
        proxy_read_timeout    300; # https://github.com/gitlabhq/gitlabhq/issues/694
        proxy_connect_timeout 300; # https://github.com/gitlabhq/gitlabhq/issues/694
        proxy_redirect        off;

        proxy_set_header  X-Forwarded-Proto http;
        proxy_set_header  Host              $http_host;
        proxy_set_header  X-Real-IP         $remote_addr;

        proxy_pass http://gitlab;
    }
}

but if I want to clone over http

git clone http://192.168.1.101:12345/pzyme/test.git

i got this error

Cloning into 'test'...
Username for 'http://192.168.1.101:12345':pzyme
Password for 'http://[email protected]:12345':
fatal:protocol error:bad line length character:8f4
fatal:The remote end hung up unexpectedly

but Apache working well

httpd conf

NameVirtualHost *:12345
<VirtualHost *:12345>
  ServerName 192.168.1.101
  ServerSignature Off
  ProxyPreserveHost On
  <Location />
    Order deny,allow
    Allow from all
    ProxyPassReverse http://127.0.0.1:8080
  </Location>
  RewriteEngine on
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteRule .* http://127.0.0.1:8080%{REQUEST_URI} [P,QSA]
  DocumentRoot /home/git/gitlab/public
  ErrorDocument 404 /404.html
  ErrorDocument 422 /422.html
  ErrorDocument 500 /500.html
  ErrorDocument 503 /deploy.html

  LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b" common_forwarded
  ErrorLog  /var/log/httpd/gitlab.com_error.log
  CustomLog /var/log/httpd/gitlab.com_forwarded.log common_forwarded
  CustomLog /var/log/httpd/gitlab.com_access.log combined env=!dontlog
  CustomLog /var/log/httpd/gitlab.com.log combined
</VirtualHost>
git clone http://192.168.1.101:12345/pzyme/test.git
Cloning into 'test'...
Username for 'http://192.168.1.101:12345':pzyme
Password for 'http://[email protected]:12345':
remote: Counting objects:16,done.
remote: Compressing ojects:16,done.
remote: Total 16(delta 3),reused 0 (delta 0)
Unpacking objects: 100%(16/16),done.
PS: ssh working well both on nginx and httpd
Assignee
Assign to
Time tracking