我正在尝试使用以下命令从我的bitbucket存储库的特定分支中获取一个git clone :
git clone <url> --branch <branchname>.
但是,我在获取克隆时遇到以下错误:
错误:无法创建文件foldername/nodemodules/......:文件名太长.
我尝试通过在我的git cmd中运行以下命令来解决这个问题
git config --system core.longpaths true.
但我得到:
错误:无法锁定配置文件c://.gitconfig:权限被拒绝错误:无法锁定配置文件c://.gitconfig:无效的参数.
请建议如何解决这两个错误.
在詹金斯下,我遇到了该线程longpaths中描述的相同问题。
这个git config --system core.longpaths true解决方案应该可以为我解决这个问题(我还没有尝试过),但是......我应该把它放在哪里?
答案指出“您应该能够运行该命令...或手动将其添加到您的 git 配置文件之一” ——哪个 git 配置文件?
我无法在 sourcetree 上启动存储库。
我得到:
bad numeric config value 'tru' for 'core.longpaths': invalid unit
Run Code Online (Sandbox Code Playgroud)
这是在我尝试克隆一个具有长文件名的项目后发生的。
然后我尝试启用“ core.longpaths”。
请问如何解决?
C:\Users\User\Desktop>git clone https://github.com/XXXXXXXXXX.git
Cloning into 'one-piece'...
remote: Counting objects: 5463, done.
remote: Compressing objects: 100% (3600/3600), done.
remote: Total 5463 (delta 1539), reused 5359 (delta 1438), pack-reused 0
Receiving objects: 100% (5463/5463), 5.08 MiB | 1.38 MiB/s, done.
Resolving deltas: 100% (1539/1539), done.
Checking connectivity... done.
warning: unable to access 'hackathon/node_modules/noble/node_modules/bluetooth-hci-socket/node_modules/usb
/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/
node_modules/core-util-is/lib/.gitattributes': Filename too long
fatal: cannot create directory at 'hackathon/node_modules/noble/node_modules/bluetooth-hci-socket/node_mod
ules/usb/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable
-stream/node_modules/process-nextick-args': Filename too long
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out …Run Code Online (Sandbox Code Playgroud)