Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

git LFS, Reverse Proxy, and HTTPS

Eric Nelson April 11, 2017

I have an nginx reverse proxy that has been running bitbucket for over a year now (on https://git.example.com and ssh://gitssh.example.com:7999). I just created a new instance of Bitbucket that has git lfs enabled (I didn't put LFS on the old instance because LFS is experimental for us now, and I didn't want to mess up production--turned out to be a good decision).

We setup the new instance and got it working (http://gitlfs:7990 and ssh://gitlfs:7999), and was verified using the following commands to download a 80MB file

 

 

git clone ssh://git@gitlfs:7999/proj/repo.git
cd repo
# Setup LFS
git lfs install
git config filter.lfs.smudge "git-lfs smudge --skip %f"
git config filter.lfs.process "git-lfs filter-process --skip"

# Check out the branch with a lot of files
git checkout origin/develop

# Pull a single file
git lfs pull -I "File80MB.bin"

 

Everything worked fine. It was quick. Great.

 

So now we want to move it to that it uses HTTPS, which goes through the aforementioned nginx reverse proxy. I updated things one-by-one. 

  • Change SSH base URL to gitlfsssh.example.com (still works)
  • Disable HTTP(S) (just a test, stops working, then re-enabled)
  • Edit server.xml to match reverse proxy to gitlfs.example.com (get warnings because server.xml and URL don't match)
  • Edit HTTP base URL to gitlfs.example.com (warnings go away, BUT)

The BUT is that when I repeat the steps above, the `git lfs pull -I "File80MB.bin"` is now extremely slow. Slow to the point that it seems to lock up the bitbucket server for some time. In fact, the progress bar tends to overshoot if I wait long enough:

Git LFS: (1 of 1 files) 97.15 MB / 81.02 MB

  Any ideas on what I might be doing wrong? Not being able to route through the reverse proxy greatly inhibits our ability to move git-lfs to production.

Thanks in advance

 

1 answer

0 votes
Eric Nelson May 1, 2017

Turns out it was a bad ethernet cable. ::Phew:: That was a weird one. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events