gpt4 book ai didi

java - 如何在 git clone 期间修复 "Filename too long error"

转载 作者:搜寻专家 更新时间:2023-11-01 01:05:51 25 4
gpt4 key购买 nike

我正在尝试使用以下命令从我的 bitbucket 存储库的特定分支中获取 git 克隆: git clone <url> --branch <branchname> .

但是,我在进行克隆时遇到以下错误:

error:unable to create file foldername/nodemodules/......: Filename too long.

我尝试通过在我的 git cmd 中运行以下命令来解决这个问题 git config --system core.longpaths true .

但我得到:

error: could not lock config file c://.gitconfig: Permission denied error: could not lock config file c://.gitconfig: Invalid argument.

如何解决这两个错误?

最佳答案

  1. 以管理员身份启动 Git Bash
  2. 运行命令 git config --system core.longpaths true

另一种方式(仅适用于此克隆):

git clone -c core.longpaths=true <repo-url>

关于java - 如何在 git clone 期间修复 "Filename too long error",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52699177/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com