You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a Chef cookbook that uses git-lfs to store some binaries. If we depend on it from other cookbooks, berkshelf fails to fetch it during berks install like this:
Fetching 'some-cookbook' from git@git.example.com:chef/some-cookbook.git (at master)
Git error: command `git reset --hard 977350841d8984d56feb3b98faed6a86b22efb79` failed. If this error persists, try remo
ving the cache directory at '/home/maoe/.berkshelf/.cache/git/e41334cf49b248784779d83338e08899eee8ef5d'.Output from the
command:
hint: The remote resolves to a file:// URL, which can only work with a
hint: standalone transfer agent. See section "Using a Custom Transfer Type
hint: without the API server" in custom-transfers.md for details.
Downloading files/default/some-binary.ubuntu-16.04 (152 MB)
hint: The remote resolves to a file:// URL, which can only work with a
hint: standalone transfer agent. See section "Using a Custom Transfer Type
hint: without the API server" in custom-transfers.md for details.
Error downloading object: files/default/some-binary.ubuntu-16.04 (d297b69): Smudge error: Error downloading files/default/some-binary.ubuntu-16.04 (d297b6970253e17f5e835261ca7645d364a0a23cd73b25ad30ae1f3e4c6fd506): batch request: missing protocol: "file:///home/maoe/.berkshelf/.cache/git/e41334cf49b248784779d83338e08899eee8ef5d/.git/info/lfs"
Errors logged to /tmp/d20190917-15282-4oev7p/.git/lfs/logs/20190917T111501.394111993.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: files/default/some-cookbook.ubuntu-16.04: smudge filter lfs failed
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/berkshelf-7.0.7/lib/berkshelf/mixin/git.rb:24:in `git'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/berkshelf-7.0.7/lib/berkshelf/locations/git.rb:57:in `block in install'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/berkshelf-7.0.7/lib/berkshelf/locations/git.rb:55:in `chdir'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/berkshelf-7.0.7/lib/berkshelf/locations/git.rb:55:in `install'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/berkshelf-7.0.7/lib/berkshelf/installer.rb:193:in `block in download_locations'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/berkshelf-7.0.7/lib/berkshelf/installer.rb:190:in `each'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/berkshelf-7.0.7/lib/berkshelf/installer.rb:190:in `download_locations'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/berkshelf-7.0.7/lib/berkshelf/installer.rb:160:in `install_from_universe'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/berkshelf-7.0.7/lib/berkshelf/installer.rb:43:in `run'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/berkshelf-7.0.7/lib/berkshelf/berksfile.rb:405:in `install'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/berkshelf-7.0.7/lib/berkshelf/cli.rb:131:in `install'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/berkshelf-7.0.7/lib/berkshelf/cli.rb:47:in `dispatch'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/berkshelf-7.0.7/lib/berkshelf/cli.rb:23:in `execute!'
/opt/chefdk/embedded/lib/ruby/gems/2.5.0/gems/berkshelf-7.0.7/bin/berks:5:in `<top (required)>'
/usr/bin/berks:306:in `load'
/usr/bin/berks:306:in `<main>'
We have a Chef cookbook that uses git-lfs to store some binaries. If we depend on it from other cookbooks, berkshelf fails to fetch it during
berks install
like this:Apparently this happens because berkshelf clones a bare repository as a cache and clone it to another workspace locally, but unfortunately git-lfs doesn't support fetching from local repositories so
git reset --hard #{@revision}
fails with the error messages above.I guess we can do either of the following:
git %{clone --no-checkout --reference="#{cache_path}" #{url} "#{scratch_path}"}
url
instead ofcache_path
. It could be slower though.What do you think? If the former sounds good I can make a patch.
FWIW I'm using berkshelf 7.0.7 on Ubuntu.
The text was updated successfully, but these errors were encountered: