To create a Git LFS local repository and enable calculation of LFS package metadata set GitLfs as the Package Type.
You can create a Git LFS remote repository to proxy LFS repositories on GitHub, or Git LFS local repositories on other Artifactory instances. If you are proxying a Git LFS local repository on another instance of Artifactory, you can enjoy all the features of a smart remote repository.
To define a Git LFS remote repository, create a new remote repository, set its Package Type to be Git LFS, and set the URL of the repository you want to proxy.
A Virtual Repository defined in Artifactory aggregates packages from both local and remote repositories.
This allows you to access both locally hosted binary assets and remote proxied git LFS repositories from a single URL defined for the virtual repository.
To create a Git LFS virtual repository set Git LFS to be its Package Type, and select the underlying local and remote Git LFS repositories to include under the Repositories section.
Make sure you also set the Default Deployment Repository so you can both download from and upload to this repository.
In order for your client to upload and download LFS blobs from artifactory the
[lfs] clause should be added to the .
lfsconfig file of your Git repository in the following format.
[lfs] url = "https://<artifactory server path>/api/lfs/<LFS repo key>" For example: [lfs] url = "https://localhost:8080/artifactory/api/lfs/lfs-local"
You can also set different LFS endpoints for different remotes on your repo (as supported by the Git LFS client), for example:
[remote "origin"] url = https://... fetch = +refs/heads/*:refs/remotes/origin/* lfsurl = "http://localhost:8081/artifactory/api/lfs/lfs-local"
If you select your GitLFS repository in the Tree Browser and click Set Me Up, Artifactory will display these clauses in a dialog from which you can simply copy and paste them.
When using HTTPS (i.e. behind a proxy) with a self signed certificate your configuration might also require you to add the following:
Always consult your System Administrator before bypassing secure protocols in this way.
When running Artifactory behind a proxy, defining a base url is usually required (depending on configuration) due to the operation of the
Git LFS client which expects to receive redirect urls to the exact upload \ download location of blobs.
When accessing a Git LFS repository through Artifactory, the repository URL must be prefixed with api/lfs in the path, except when configuring replication.
For example, if you are using Artifactory standalone or as a local service, you would access your LFS repositories using the following URL:
Or, if you are using SaaS the URL would be:
When configuring replication, reference the repository's browsable url i.e.;
By default, Artifactory allows anonymous access to Git LFS repositories. This is defined in the Admin module under Security | General . For details please refer to Allow Anonymous Access.
If you want to be able to trace how users interact with your repositories you need to uncheck the Allow Anonymous Access setting. This means that users will be required to enter their username and password.
The Git LFS client will ask for credentials for the Artifactory LFS repo when accessing it - if anonymous access is allowed you can just enter blank credentials, otherwise you should enter your Artifactory user name and password (not your Git one).
To make the authentication process automatic you can use Git Credential Helpers to store these for you, and have the Git LFS client authenticate automatically.
From version 4.4, Artifactory supports authenticating your Git LFS client via SSH.
To authenticate yourself via SSH when using the Git LFS client, execute the following steps:
Update the known_hosts file with the Artifactory server public key. This file is located under
~/.ssh/known_hosts (and there is also a system-wide file under
/etc/ssh/known_hosts). This should take the following format:
[<server_custom_base_URL>]:<server_port> <content of the Artifactory server public ssh key>
[myartifactory.company.com]:1339 ssh-rsa AAAAB3Nza...PC0GuTJT9TlaYD firstname.lastname@example.org
.lfsconfig file at the repository level (not the global level) as follows:
url = "ssh://email@example.com:1339/artifactory/lfs-local"
If you are using a dedicated server on Artifactory SaaS and wish to authenticate via SSH, please contact firstname.lastname@example.org.
As the Git LFS client supplies only limited data about the blob being uploaded (only it's sha256 checksum, or 'OID', and it's size) Artifactory does not store or process any metadata for LFS blobs.
You can set properties on the blobs for your own convenience but this requires extra logic to infer a sha256-named file stored in artifactory from the actual pointer stored in your Git repository.
Artifactory stores LFS blobs in a manner similar to the Git LFS client, using the provided sha256 checksum.
Git LFS blobs will be stored under a path such as
Where ad and 1b are the 1st and 2nd, and the 3rd and 4th characters in the blob's name respectively.
The Git LFS client will download the pointer file it created in your remote Git repository if downloading the blob from the LFS endpoint failed (i.e. wrong credentials, network error etc.).
This will cause the actual file in your local repo to be substituted with the pointer created by the LFS client with the same name and lead to any number of problems this behavior can cause.
This is a limitation of the LFS client tracked by issue 89.