question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Working with LFS repositries

See original GitHub issue

Hi there,

Can copybara operate with repositories with files managed by Git LFS? My scenario is as follows:

  • I have a private repository on github that has many artifacts (some of which are large files which are managed by LFS). This repository acts as a source repository.
  • I also have another private repository on github which acts as the target repository.
  • The source repository gets frequent pushes, and from time to time we need to selectively copy certain files from it to the target repository.
  • when using copybara to do so, we get an error message during the task: “Git Destination: Checking out master”:
Error downloading object: (...): batch request: missing protocol: ""
Errors logged to (...)
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: (...): smudge filter lfs failed

which seems as a problem with relevant to git-lfs.

So does copybara support repositories with LFS-managed files?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:3
  • Comments:9

github_iconTop GitHub Comments

4reactions
ghareeb-falazicommented, Jul 11, 2018

So as a workaround I found out that if the .gitconfig file does not include the following section:

[filter "lfs"]
	clean = git-lfs clean -- %f
	smudge = git-lfs smudge -- %f
	process = git-lfs filter-process
	required = true

Then copybara handles lfs repositories just fine.

3reactions
kjellander-unitycommented, Oct 7, 2020

To help future readers: newer versions of git-lfs (e.g. when installing ubuntu:20.04 docker image) will setup system-wide Git LFS configuration in /etc/gitconfig for you, making Copybara error out when working with Git LFS enabled repos. Simplest workaround seems to be just deleting the file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git LFS - large file storage | Atlassian Git Tutorial
Git LFS is a Git extension that improves handling of large files by lazily downloading the needed versions during checkout, rather than during...
Read more >
Configuring Git Large File Storage - GitHub Docs
Once Git LFS is installed, you need to associate it with a large file in your repository. ... If there are existing files...
Read more >
Why and How to Use Git LFS - DZone
Navigate to your Git repository (where the .git directory is located) and execute the following command in order to activate Git LFS: $...
Read more >
Git Large File Storage (LFS) - GitLab Docs
How it works ... Git LFS client communicates with the GitLab server over HTTPS. It uses HTTP Basic Authentication to authorize client requests....
Read more >
Handling Large Files with LFS | Learn Version Control with Git
Working with large binary files can be quite a hassle: they bloat your local repository and leave you with Gigabytes of data on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found