Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Managing LFS Files in JFrog Artifactory

Hello Everyone,

This article mainly focuses on how to manage your LFS files in your git repository in the remote.
So how do you manage Large files in the git repository?

Well, we have options when it comes to managing LFS files in Bitbucket Cloud.
The first option is using the same repository for managing LFS Files.
Other than that Sonar Cloud and JFrog Artifactory are also good options.

Let's look briefly at how to configure the repository in JFrog Artifactory for using LFS files.
The first step is to have a proper naming convention for the repository you are giving in JFrog Artifactory.
Please follow the guide here to know more about the same, it may help in other aspects also.

Create a separate User for Git Repository - LFS Management in Artifactory and have that user required permissions to the Artifactory Repository you are creating.
While setting up a repository, you have the option to setup include and exclude patterns, probably wanna be careful with that since it defines which files can be uploaded to your repository and which not, in this case, binary files.

1.png

2.png

3.png

JFrog Artifactory gives you the extent of replicating the repository from one instance to another, which helps if you have users around the globe.

The replication use case scenario depends on the requirement, lets a have look at it
If we have the same project shared across different development teams, in this case, it's best to use the replication feature.
Overcome connectivity issues such as network latency and stability when accessing LFS files.

4.png

5.png

We have the repository, it's upto now to inform developers on how to use LFS in their repository.
The set me up option in JFrog Artifactory gives the guide on how to setup LFS for a repository.

We can also have this configuration in the .gitconfig folder in ~(home directory)

That's it, now you are ready to use the Git Repository with LFS configured in JFrog Artifactory.

Here is a configuration file look for single repo, you would store the following in the .lfsconfig file inside the repository.

[lfs]
url = "https://<USERNAME>:<PASSWORD>@<DOMAIN>.jfrog.io/artifactory/api/lfs/<REPO-NAME>"

For Global configuration, you would store this in the home directory.

[lfs]
url = "https://<USERNAME>:<PASSWORD>@<DOMAIN>.jfrog.io/artifactory/api/lfs/<REPO-NAME>"


The information about the LFS file will be stored in Bitbucket Cloud, where you are storing your git repository and actual content will be stored in JFrog Artifactory.

7.png

8.png

Well, that's for managing LFS Files in the remote. I hope you find this article helpful and please share your thoughts in the comments.

Thanks,
Pramodh

5 comments

Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 5, 2021

@Pramodh M  

Thank you for your article!

How often do you need to use the LFS settings? And did you meet with limits ?

Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 5, 2021

Yes, I have seen a couple of our customers have this configured in their environment, and it best suits you when you have more large files, as we would want to pay for storing LFS files in their cloud environment, and functionality wise I would say its the same approach.

Taranjeet Singh
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 11, 2021

Thank you for sharing this knowledgeable article, @Pramodh M !

Like Pramodh M likes this
Sun King October 28, 2021

niceeeeeee!!

Niels Kristian Jensen February 11, 2022

I have an issue - my username contains a "@" and I've tried to replace with "%" as usual. It does not work - even with an API token as password. I can't set my username because our company uses SSO and thus dictates my username on JFROG.

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events