You can use LFS on a third party server by disabling LFS on the GitHub Enterprise appliance and configuring the Git LFS client with the URL for the server where you want to store large assets.
By default, the Git LFS client stores large assets on the same server that hosts the Git repository. When Git LFS is enabled on the GitHub Enterprise appliance, large assets are stored on the data partition in /data/user/storage
. For more information, see "Configuring Git Large File Storage for your appliance."
Users cannot push Git LFS assets to GitHub Enterprise if Git LFS is disabled on the appliance or repository.
Disable Git LFS on the GitHub Enterprise appliance. For more information, see "Configuring Git Large File Storage for your appliance."
-
Create a 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
-
To keep the same LFS configuration for each user, commit a custom
.lfsconfig
file to the repository.git add .lfsconfig git commit -m "Adding LFS config file"
Migrate any existing LFS assets. For more information, see "Migrating to a different Large File Storage Server server."