git拉去代码报Filename too long Unable to checkout错

文章描述了一种在开发过程中遇到的Git报错,由于文件路径过长,无法正常操作。提供了解决方案,即作为系统管理员使用`gitconfig--systemcore.longpathtrue`来启用长路径支持。

报错日志:

unable to create file
management/management-business/src//api/basiclibrary/shortlistsuppliermanagement/qualifyshortlistsupplierinquiry/QualifyShortlistSupplierInquiryApiImpl.java:
Filename too long Unable to checkout
‘6565dd4075489ebd224dd9b6d86e1358’ in submodule path
‘supplier-group’

报错截图:

在这里插入图片描述

解决方案:

用系统管理员执行此命令:git config --system core.longpaths true

在这里插入图片描述

git.exe clone --progress -v "https://codehub-dg-g.huawei.com/x60102926/CP_WearableCloud_HealthDeveloperService_Operation_manger.git" "C:\Users\x60102926\Desktop\HealthDeveloperService_Operation_manger\CP_WearableCloud_HealthDeveloperService_Operation_manger" Cloning into 'C:\Users\x60102926\Desktop\HealthDeveloperService_Operation_manger\CP_WearableCloud_HealthDeveloperService_Operation_manger'... warning: auto-detection of host provider took too long (>2000ms) warning: see https://aka.ms/gcm/autodetect for more information. warning: auto-detection of host provider took too long (>2000ms) warning: see https://aka.ms/gcm/autodetect for more information. POST git-upload-pack (193 bytes) POST git-upload-pack (220 bytes) remote: Enumerating objects: 2404, done. remote: Counting objects: 100% (2404/2404), done. remote: Compressing objects: 100% (1562/1562), done. remote: Total 2404 (delta 736), reused 2404 (delta 736), pack-reused 0 (from 0) Receiving objects: 100% (2404/2404), 1.29 MiB | 2.06 MiB/s, done. Resolving deltas: 100% (736/736), done. error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/bean/basiccalculation/abnormality/ActivityRecordsPeriodStatisticsAbnormalityRequest.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/bean/basiccalculation/abnormality/HealthRecordsPeriodStatisticsAbnormalityRequest.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/bean/basiccalculation/periodstatistics/ActivityRecordsPeriodStatisticsCalculateReq.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/bean/basiccalculation/periodstatistics/HealthRecordsPeriodStatisticsCalculateReq.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/bean/bo/datadict/tech/healthkit/activityrecord/ActivityRecordFieldConversionWrapperBO.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/common/web/developerscope/strategy/healthkit/HealthkitDisplayBetaRejectedStrategy.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/common/web/developerscope/strategy/healthkit/HealthkitDisplayVerifyAuditStrategy.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/common/web/developerscope/strategy/healthkit/HealthkitDisplayVerifyPassedStrategy.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/common/web/developerscope/strategy/healthkit/HealthkitDisplayVerifyRejectedStrategy.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/common/web/developerscope/strategy/healthkit/HealthkitDisplayWithoutRangeAuditStrategy.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/common/web/developerscope/strategy/healthkit/HealthkitDisplayWithoutRangePassedStrategy.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/common/web/developerscope/strategy/healthkit/HealthkitDisplayWithoutRangeRejectedStrategy.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/common/web/developerscope/strategy/healthkit/HealthkitUpdateBetaPassedWithRangeStrategy.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/common/web/developerscope/strategy/healthkit/HealthkitUpdateBetaRejectedWithRangeStrategy.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/common/web/developerscope/strategy/healthkit/HealthkitUpdatePassedWithoutRangeStrategy.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/common/web/developerscope/strategy/healthkit/HealthkitUpdateRejectedWithoutRangeStrategy.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/common/web/developerscope/strategy/healthkit/HealthkitUpdateVerifyPassedWithRangeStrategy.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/common/web/developerscope/strategy/healthkit/HealthkitUpdateVerifyRejectedWithRangeStrategy.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/daobean/datadict/tech/healthkit/activityrecord/ActivityRecordFieldConversionDaoBean.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/daobean/datadict/tech/healthkit/activityrecord/ActivityRecordFieldConversionWrapperDaoBean.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/daobean/datadict/tech/healthkit/activityrecord/ActivityRecordTechDataTypeDaoBean.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/daobean/datadict/tech/healthkit/activityrecord/DataDictTechActivityRecordDaoBean.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/daobean/datadict/tech/sporthealth/datatype/DataDictTechSportHealthDataTypeDaoBean.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/daobean/datadict/tech/sporthealth/datatype/SportHealthDataTypeDataBizPolicyDaoBean.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/mapper/datadict/tech/healthkit/activityrecord/DataDictTechHealthKitActivityRecordMapper.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/mapper/datadict/tech/healthkit/activityrecord/HealthKitActivityRecordTechDataTypeMapper.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/mapper/datadict/tech/healthkit/healthrecord/DataDictTechHealthKitHealthRecordMapper.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/mapper/datadict/tech/healthkit/healthrecord/HealthKitHealthRecordTechDataTypeMapper.java: Filename too long error: unable to create file HealthKitCommon/src/main/java/com/huawei/healthkit/mapper/datadict/tech/sporthealth/datatype/SportHealthDataTypeDataBizPolicyMapper.java: Filename too long Updating files: 100% (1964/1964), done. fatal: unable to checkout working tree warning: Clone succeeded, but checkout failed. You can inspect what was checked out with 'git status' and retry with 'git restore --source=HEAD :/' git did not exit cleanly (exit code 128) (9469 ms @ 2025/9/16 14:31:45)
最新发布
09-17
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值