Configuring .lfsconfig

We are using Bitbucket, and I’m searching for a solution for placing large files like media files, help files etc, out of the bitbucket repository.

I’ve came across your solution, and I have installed it.

What I want is that regular files will be stored in BitBucket, while LFS files will be stored locally on a server on our network.

Using SCM-Manager, I’ve created a repository, and I was able to push files to it.
I then configured the .gitattributes file in order to define what files are considered to be LFS.

Committed and pushed the files, and it worked:
Pushing to
Uploading LFS objects: 100% (1/1), 50 B | 0 B/s, done.
POST git-receive-pack (626 bytes)
remote: Updating references: 100% (1/1)
remote: Updating references: 100% (1/1)
Branch ‘main’ set up to track remote branch ‘main’ from ‘origin’.
b35f642…63d6fca main → main
updating local tracking ref ‘refs/remotes/origin/main’

Completed successfully.

So now I’m trying to simulate the situation where files are stored in one repository while LFS files are stored in another one.

I already pushed an empty .lfsconfig, and not I’ve updated it’s content to be:

url =

Theoretically, it should have worked, since I’m pointing the lfs to the same location.

I’ve changed one of the lfs files, committed and pushed, but I’m getting an error:

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks commit -q -F C:\Users\Itais\AppData\Local\Temp\ky54h1bb.hss

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c lfs.customtransfer.bitbucket-media-api.path=git-lfs-bitbucket-media-api push -v --tags --set-upstream origin main:main
Pushing to
Uploading LFS objects: 0% (0/1), 0 B | 0 B/s, done.
batch response: Client error:
error: failed to push some refs to ‘
Completed with errors, see above.

What am I missing?


Hi @saragani

thank you for your post. We will have a look at your issue and will come back to you soon.


I was able to make it work, so I’m now going to try it with the BitBucket repo.
The url configuration should be:

url =

It seems that the correct url is always the address to the repot (with .git at the end of the address) with /info/lfs after it.


Alright, thank you @saragani for sharing your solution with the community!

1 Like