You can use Git Large File Storage (Git LFS) on a third party server by disabling Git 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 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 appliance, large assets are stored on the data partition in /data/user/storage
.
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."
-
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
-
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"
Migrate any existing Git LFS assets. For more information, see "Migrating to a different Git Large File Storage server."