[英]fatal: '$GIT_DIR' too big when using CMake's FetchContent feature
I'm using CMake's FetchContent feature to fetch the esp-azure repo.我正在使用 CMake 的 FetchContent 功能来获取esp-azure 存储库。 While doing so I got the following:这样做时,我得到了以下信息:
Cloning into 'C:/code/my-repo/build/_deps/espazure-src/azure-iot-sdk-c/provisioning_client/deps/utpm/deps/c-utility/deps/umock-c/deps/ctest/deps/azure-macro-utils-c'...
fatal: '$GIT_DIR' too big
fatal: clone of 'https://github.com/Azure/azure-macro-utils-c.git' into submodule path 'C:/code/my-repo/build/_deps/espazure-src/azure-iot-sdk-c/provisioning_client/deps/utpm/deps/c-utility/deps/umock-c/deps/ctest/deps/azure-macro-utils-c' failed
Failed to clone 'deps/azure-macro-utils-c'. Retry scheduled
I tried defining git config core.longpaths true
but that didn't help.我尝试定义git config core.longpaths true
但这没有帮助。 My guess is that the cloned repositories have their own git configs and so the parameter is overwritten.我的猜测是克隆的存储库有自己的 git 配置,因此参数被覆盖。
How can I tackle this?我该如何解决这个问题?
I was facing this error so I tried with the command git clone <git-repo> <short-directory-name>
我遇到了这个错误,所以我尝试使用命令git clone <git-repo> <short-directory-name>
And this worked for me.这对我有用。
Giving shorter directory name to the cloned location helped为克隆位置提供较短的目录名称有帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.