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.
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.
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.
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
Pramodh M
DevSecOps Consultant
DevTools
Bengaluru
661 accepted answers
5 comments