lfs-test-server
lfs-test-server copied to clipboard
test server reverse proxy issues
Hello! I'm not very experienced with this so I might've overlooked something, but:
(1) I set up the lfs-test-server, and was able to successfully commit to it with a local repo and see the hash on github (using the remote lfs address of http://localhost:9999/testrepo/lfs
).
(2) I then tried to use let's encrpt and nginx to handle the SSL and reverse proxy on the same machine. I set it up, and I'm able to get to the MGMT page from the public URL over HTTPS. When I try to push from a separate computer, it asks me for my password, and hangs at 0%. My logs don't show any errors, I get clean push requests, and the 'objects' part of the MGMT interface appears to update with hashes of relevant files, but if you click on them it gives a 'not found'.
My NGINX sites-enabled/default looks like the below. Any suggestions for how to troubleshoot this and/or what I'm doing wrong would be greatly appreciated! Thank you guys for making really useful stuff.
server {
server_name feedback.media.mit.edu;
location / {
proxy_set_header Host $host;
proxy_set_header Referer $http_referer;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Fix the “It appears that your reverse proxy set up is broken" error.
proxy_pass http://localhost:9999/;
proxy_read_timeout 100;
proxy_send_timeout 100;
proxy_connect_timeout 150;
dav_methods PUT DELETE MKCOL COPY MOVE;
create_full_put_path on;
client_max_body_size 10000m;
client_body_buffer_size 128k;
proxy_redirect http://localhost:9999 https://feedback.media.mit.edu/;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/feedback.media.mit.edu/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/feedback.media.mit.edu/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = feedback.media.mit.edu) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name feedback.media.mit.edu;
return 404; # managed by Certbot
}
When I try to push from a separate computer, it asks me for my password, and hangs at 0%.
Interesting. In your previous remark, you indicated that you are able to push from your computer to localhost:9999
. Can you also push from the computer hosting the running instance of lfs-test-server
to the name configured through NGINX?
If not, I am inclined to believe that this is a network connectivity issue or something related to your NGINX configuration. I can try to confirm that it is one of these two, but I am unable to help out with debugging those issues specifically beyond that.
To confirm the root cause of this, can you retry the push that gets stuck at 0%
with GIT_TRACE=1
in your environment and paste the relevant logs here?
My logs don't show any errors, I get clean push requests, and the 'objects' part of the MGMT interface appears to update with hashes of relevant files, but if you click on them it gives a 'not found'.
EDIT: this sounds like a bug within lfs-test-server
. I'll take a look at this myself.
Same error also 😄
Using NGINX with Cloudflare reverse proxy, I get the following error.
C:\Users\user\Documents\GitHub\akx20000a\test2>git push
Git LFS: (0 of 1 files) 12.00 KB / 848.00 MB
LFS: Client error: http://localhost:8080/objects/0a03608988cfd2e50567990dc8be96fb3c501e198e2e6efcb846d89efc7b89f2 from HTTP 413
error: failed to push some refs to 'https://github.com/akx20000a/test2.git'
Hi @akx20000a can you please run the git push
again with GIT_TRACE=1
in your environment to see in more detail what the issue might be? Thanks in advance!
I had the same issue, but was able to get the reverse proxy working by setting:
LFS_HOST="<server_name>/<path>"
In your case i guess:
LFS_HOST="feedback.media.mit.edu"
should do the trick
Maybe this helps you to...
EDIT: these options are described at https://github.com/git-lfs/lfs-test-server#running