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.
.lfsconfig
[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:
.git/config different lfs url for remotes
[remote "origin"] url = https://... fetch = +refs/heads/*:refs/remotes/origin/* lfsurl = "http://localhost:8081/artifactory/api/lfs/lfs-local"
Copy these clauses using Set Me Up
If you select your Git LFS 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.
Working with Proxies and HTTPS
When using HTTPS (i.e. behind a proxy) with a self signed certificate your configuration might also require you to add the following:
.gitconfig http section
[http] sslverify = false
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.
LFS repositories must be prefixed with api/lfs in the path
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:
http://localhost:8081/artifactory/api/lfs/<repository key>
Or, if you are using Cloud the URL would be:
https://<server name>.jfrog.io/artifactory/api/lfs/<repository key>
When configuring replication, reference the repository's browsable url i.e.;
http://localhost:8081/artifactory//<repository key>