artemkin / git-lfs-server

Git LFS server
Other
140 stars 20 forks source link

Setup with Proxy not working #11

Open HartmutWoehrle opened 5 years ago

HartmutWoehrle commented 5 years ago

Hello

I tried to setup the server with a Apache HTTP Server in a Proxy Setup, because the git Server is running behind a Firewall with a Reverse Proxy in front of it.

With the setup as:

<Location "/gitlfs/">
  ProxyPreserveHost On
  ProxyPass  http://127.0.0.1:8081/
  RequestHeader set X-Forwarded-Proto "https"
  RequestHeader set X-Forwarded-Port "443"
  Require all granted
</Location>

and running as:

lfs_server.sh -verbose -s 127.0.0.1 -p 8081
./lfs_server
2019-03-25 16:16:30.224961+01:00 Listening for HTTP on 127.0.0.1:8081

2019-03-25 16:16:37.244723+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:17:40.574301+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:18:43.650446+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:19:46.964631+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:20:50.057109+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:21:53.179640+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:22:56.251200+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:23:59.320916+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK
2019-03-25 16:25:02.603886+01:00 Info 127.0.0.1 "POST /objects/batch HTTP/1.1" 200 OK

the git client push gives a:

$ git push
Uploading LFS objects:   0% (0/3), 0 B | 0 B/s, done
LFS: Put http://gitserver.domain.com:8081/objects/1da2187dd695a85136920e9aac633fefdc236418d1dbb40b0babdcc961e9d49b: dial tcp 192.168.51.123:8081: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
LFS: Put http://gitserver.domain.com:8081/objects/9a7eb7e95b62d4c5659571356f3b7adc91f2b85f3b2ad0d840288d3aa0d358b2: dial tcp 192.168.51.123: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
LFS: Put http://gitserver.domain.com:8081/objects/9495f0f0a5bee39b13647cc31d0011d910149bf4225452c4925713a893e8d673: dial tcp 192.168.51.123:8081: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
error: failed to push some refs to 'https://User@gitserver.domain.com/git/MyRepo.git'

Apache Logs gives no problem either: 192.168.51.123 - - [25/Mar/2019:16:16:37 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:17:40 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:18:43 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:19:46 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:20:50 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:21:53 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:22:56 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:23:59 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504 192.168.51.123 - - [25/Mar/2019:16:25:02 +0100] "POST /gitlfs/objects/batch HTTP/1.0" 200 1504

Could someone please help? Thanks Hartmut