Git 克隆无法创建文件

标签 git git-clone

尝试克隆远程 git 存储库(裸机)时,我遇到了如下几个错误,之后 git 停止了。

error: unable to create file frozen/email/lamson/mymailserver/run/queue/mark.name/cur/1361115664.1929_1.vps-pool-55:2,S (Invalid argument)

如果我必须删除这些文件也没关系,但如果我无法克隆,我就无法找到这样做的方法。

知道我能做什么吗?

最佳答案

我猜您可能正在尝试在 Windows 机器上进行克隆。 Windows 不允许文件名使用 : 字符。

来自Microsoft documentation :

Use any character in the current code page for a name, including Unicode characters and characters in the extended character set (128–255), except for the following:

  • The following reserved characters:
    • < (less than)
    • > (greater than)
    • : (colon)
    • " (double quote)
    • / (forward slash)
    • \ (backslash)
    • | (vertical bar or pipe)
    • ? (question mark)
    • * (asterisk)
  • Integer value zero, sometimes referred to as the ASCII NUL character.
  • Characters whose integer representations are in the range from 1 through 31, except for alternate data streams where these characters are allowed. For more information about file streams, see File Streams.
  • Any other character that the target file system does not allow.

要解决此问题,您可能需要在非 Windows 系统上克隆并更正有问题的文件名。也许一些 Windows 专家会有更好的解决方案。

关于Git 克隆无法创建文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17910125/

相关文章:

Git-Flow 撤消已完成的功能分支

git - pull 请求已 merge 、关闭,然后还原 - 现在无法再次 pull 分支

git 克隆失败,出现 "fatal: Out of memory, malloc failed"错误

git - 如何将普通的 Git 存储库转换为裸存储库?

git clone vs 复制粘贴,有什么区别?

特定设备的 Android 源代码

javascript - 如何在 npm 安装期间将 fork 的存储库更新为依赖项?

git - 如何在 git 日志中获取 TFS checkin ID?

Git 克隆一个分支,而不是 master

git - 'git submodule add' 不克隆它