Artifactory supports authenticating your Git LFS client via SSH for Self Hosted instances.
Not Supported for JFrog Cloud
Git LFS with SSH Authentication is not supported for JFrog Cloud customers.
To authenticate yourself via SSH when using the Git LFS client, execute the following steps:
Make sure Artifactory is properly configured for SSH as described in the SSH Server Configuration.
Upload your SSH Public Key in the SSH section of your user profileas described in Configuring User Authentication.
Configure the Git LFS client as follows:
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>
For example,
[myartifactory.company.com]:1339 ssh-rsa AAAAB3Nza...PC0GuTJT9TlaYD user@domain.com
Update your
.lfsconfig
file at the repository level (not the global level) as follows:ssh://$USERNAME@$HOST:$PORT/artifactory/<repoKey>
For example,
url = "ssh://john@myartifactory.company.com:1339/artifactory/lfs-local"
Note
While the
$USERNAME
field is not mandatory, it is good practice to add it for self-reference.