警告:克隆成功,但结帐失败

时间:2016-09-17 01:55:04

标签: github

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 with 'git status'
and retry the checkout with 'git checkout -f HEAD'

3 个答案:

答案 0 :(得分:8)

试试这个:

git config --system core.longpaths true

documentation

答案 1 :(得分:0)

以下答案对我有用

  1. 打开cmd或git bash并以管理员身份运行
  2. 在您以上方管理员身份运行的cmd或git bash上提供以下命令
git config --system core.longpaths true
  1. 这将允许全局访问长文件名
  2. 现在您可以克隆存储库,而文件名太长

答案 2 :(得分:0)

还要检查存储库是否不包含名为“con”或“prn”的文件夹,因为这些是 Windows 中的保留文件夹,但在 MacOS 中是允许的。

例如。 src/main/kotlin/con/ 会在 Windows 机器上中断