在对某些仓库进行 Git Clone 的时候遇到了 Filename too long 的错误提示。

错误提示如下图:


可以有下面的一些解决办法:

可以有下面的一些解决办法:

在 Git bash 中运行下面的命令,来进行 git 配置的全局修改:

git config --system core.longpaths true

在 Clone 仓库出现上面的错误后,进行已经克隆的目录中,然后找到 .git 目录的 config 文件。

添加

longpaths = true

这个配置。

然后重新删除已经克隆的目录中除了 .git 的所有目录。

然后再重新 checkout branch。

第 3 种办法就是在 Check out 的时候添加参数。

例如使用下面的命令进行 check out。

在 Clone 的时候添加 -c core.longpaths=true 参数。

例如使用下面的命令进行 clone

git clone -c core.longpaths=true "https://src.ossez.com/spring/spring-boot.git" "C:\WorkDir\spring-boot"

你应该能够没有问题的解决这个问题。

https://blog.ossez.com/archives/3130

Git Clone 的时候遇到 Filename too long 错误的更多相关文章

  1. git clone Failed to connect to 127.0.0.1 port 43213: Connection refused

    不知道为什么使用git clone 的时候报了上面的错误,后面发现是 127.0.0.1 port 43213的端口被代理占用了,可以这样查看: $ env|grep -i proxy 结果是: NO ...

  2. git clone的时候报error: RPC failed; result=18错误

    因业务需求,需要把内网gitlab仓库的地址对外网访问,在gitlab前端配置了一个nginx代理服务器,来实现需求,可以在git clone的时候报error: RPC failed错误 [root ...

  3. 解决$ git clone fatal: Authentication failed

    今天在使用git clone克隆项目的时候报如下错误: $ git clone XXXXXX Cloning into 'XXXX'... fatal: Authentication failed f ...

  4. 升级了git版本后git clone报ssl错误的解决方法

    由于升级了git版本,git clone 的时候报了如下的错误 fatal: unable to access 'https://github.com/open-falcon/falcon-plus. ...

  5. git clone remote: HTTP Basic: Access denied

    git clone 项目失败,报下面的错误信息: $ git clone http://192.168.0.141/xxxx.git Cloning into 'appEnterprise'... r ...

  6. idea在使用git clone 时出现Filename too long

    idea在使用git clone 时出现Filename too long的报错信息,使用如下命令就可以解决该问题:在 git bash命令模式下,运行命令 git config --global c ...

  7. git clone出现的error: The requested URL returned error: 401 Unauthorized

    error: The requested URL returned error: 401 Unauthorized while accessing https://git.oschina.net/.. ...

  8. git clone Linux 源码并切换TAG

    想从github上下载一个特定TAG分支来查看代码,按照先git clone后git checkout的方式,提示说有文件没有提交.因为只查看不编译运行,所以这些关系不大的文件采取删除或者重新命名后提 ...

  9. git clone时,报403错误,完美解决方案

    首先命令行操作结果如下: root@zhiren-PowerEdge-T110-II:/zrun# git clone https://git.coding.net/xxxxxxxx/xxxx.git ...

随机推荐

  1. Python单元测试笔记

    单元测试根据级别不同可分为:单元测试.集成测试.系统测试.验收测试.回归测试 单元测试的更能特点:对代码最基本单元(函数.方法)的测试. 给予特定条件判断结果是否符合预期 相对整个程序的测试,单元测试 ...

  2. [Tensorflow]激励函数tf.nn.relu样例

    代码: import tensorflow as tf import numpy as np ### 定义添加神经网络层函数 START ### def add_layer(inputs,in_siz ...

  3. controller 层 date 类型的参数,SpringBoot自动转换 dateformat

    这样客户端提交的String 就可以自动转换为Date了!!!

  4. Idea查看一个类和子类(实现类)的结构图

    选择一个类:右键选择Diagrams-show Diagrams(show Diagrams popup表示悬浮当前窗口) 进入下面类似下面的界面: 如果想查看某个类或接口的子类: 先查看自己本地设置 ...

  5. JS数组操作,赋值指向同一指针

    1.使用slice() 可使用slice()进行复制,因为slice()返回也是数组. var array1 = new Array("1","2"," ...

  6. Mac上搭建Web服务器--Apache

    局域网搭建 Web 服务器测试环境,因为Mac OS X 自带了 Apache 和 PHP 环境,我们只需要简单的启动它就行了. 1.命令:sudo apachectl start Apache服务器 ...

  7. 03 WIndows编程——手绘函数调用过程

    源码 #include<Windows.h> #include<stdio.h> int MessageBoxPrint(char *szFormat, ...); int W ...

  8. WebApplication 启动类一定要存于某个包下

    否则spring启动器 无法识别 包类目录

  9. 页面Header自适应屏幕

    <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8& ...

  10. 用js刷剑指offer(二进制中一的个数)

    题目描述 输入一个整数,输出该数二进制表示中1的个数.其中负数用补码表示. 牛客网链接 思路 如果一个整数不为0,那么这个整数至少有一位是1.如果我们把这个整数减1,那么原来处在整数最右边的1就会变为 ...