Article version: Enterprise Server 2.13

This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2019-03-27. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Configuring Git Large File Storage to use a third party server

You can use Git Large File Storage (Git LFS) on a third party server by disabling Git LFS on the GitHub Enterprise Server appliance and configuring the Git LFS client with the URL for the server where you want to store large assets.

By default, the Git Large File Storage client stores large assets on the same server that hosts the Git repository. When Git LFS is enabled on the GitHub Enterprise Server appliance, large assets are stored on the data partition in /data/user/storage.

Users cannot push Git LFS assets to GitHub Enterprise Server if Git LFS is disabled on the appliance or repository.

  1. Disable Git LFS on the GitHub Enterprise Server appliance. For more information, see "Configuring Git Large File Storage."

  2. Create a Git LFS configuration file that points to the third party server.

    # Show default configuration
    $ git lfs env
    > git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1; git 94d356c)
    > git version 2.7.4 (Apple Git-66)
     
    > Endpoint=https://GITHUB-ENTERPRISE-HOST/path/to/repo/info/lfs (auth=basic)
     
    # Create .lfsconfig that points to third party server.
    $ git config -f .lfsconfig remote.origin.lfsurl https://THIRD-PARTY-LFS-SERVER/path/to/repo
    $ git lfs env
    > git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1; git 94d356c)
    > git version 2.7.4 (Apple Git-66)
     
    > Endpoint=https://THIRD-PARTY-LFS-SERVER/path/to/repo/info/lfs (auth=none)
     
    # Show the contents of .lfsconfig
    $ cat .lfsconfig
    [remote "origin"]
       lfsurl = https://THIRD-PARTY-LFS-SERVER/path/to/repo
  3. To keep the same Git LFS configuration for each user, commit a custom .lfsconfig file to the repository.

    $ git add .lfsconfig
    $ git commit -m "Adding LFS config file"
  4. Migrate any existing Git LFS assets. For more information, see "Migrating to a different Git Large File Storage server."

Further reading

Ask a human

Can't find what you're looking for?

Contact us