0

我正在从 berkshelf 过渡到 Policyfile 工作流程,并且在我尝试解决所有依赖项之前一切都运行良好。我的两个依赖项来自 git,所以当我chef install在说明书目录中运行时,我收到以下错误:

Error: Failed to generate Policyfile.lock
Reason: (CookbookOmnifetch::GitCommandError) Git error: command `git reset --hard 7e5e4bccf57718cacc246f1b4d501ff7de8ac13d` failed. If this error persists, 
try removing the cache directory at 'C:/Users/pcummuskey/AppData/Local/chefdk/cache/.cache/git/780b7dbee933c3a9efbfd3898d54cdf72784fa7e'.Output from the command:

error: unable to create file test/kitchen/.kitchen/tmp/librarian/cache/source/chef/site/877777683730772c36b1e6a3fc3aa2c3/windows/version-uri/a3432e93fb3c21cb7111fde71e435661/package/files/default/handlers/windows_reboot_handler.rb: Filename too long
Checking out files: 100% (389/389), done.
fatal: Could not reset index file to revision '7e5e4bccf57718cacc246f1b4d501ff7de8ac13d'.

可以预见的是,删除缓存文件夹对问题的影响为零。我正在检查我是否可以让它在 ubuntu 子系统和/或 docker atm 中工作,但是能够在 Windows 上本地运行它会很好。

4

2 回答 2

0

使用打包在Git for windows安装程序中的“git bash”(MINGW64)我没有遇到这个问题。

举个例子:

$ pwd
/c/Users/foobar/AppData/Local/chefdk/cache/.cache/git/13036489648c6f8811262c6a50ff6b03da2395b7/4416ca3886d025b3ead519f1ee53af03ecb630f64416ca3886d025b3ead519f1ee53af03ecb630f64416ca3886d025b3ead519f1ee53af03ecb630f64416ca3886d025b3ead519f1ee53af03ecb630f6/4416ca3886d025b3ead519f1ee53af03ecb630f64416ca3886d025b3ead519f1ee53af03ecb630f64416ca3886d025b3ead519f1ee53af03ecb630f61
于 2017-03-14T08:40:30.547 回答
0

通过创建一个本地食谱文件夹并检查到那里的依赖关系并通过路径引用它们,设法解决了这个问题。它不漂亮,但它确实有效。

于 2017-03-15T02:43:32.467 回答