Git克隆无法创建文件 [英] Git clone unable to create file
问题描述
尝试克隆远程git存储库(裸)时,出现如下几个错误,之后git停止。 >错误:无法创建冻结文件/电子邮件/ lamson / mymailserver /运行/队列/ mark.name / cur / 1361115664.1929_1.vps-pool-55:2,S(无效参数)
如果我必须删除这些文件,可以,但是如果我无法克隆,我找不到方法。
任何想法我能做什么?
可能试图在Windows机器上执行克隆。 Windows不允许使用:
字符的文件名。 从微软文档:
< blockquote>
使用当前代码页中的任何字符作为名称,包括Unicode字符和扩展字符集中的字符(128-255),以下内容除外:
- 以下保留字符:
- < (小于)
- >(大于)
- :(冒号)
- )
- /(正斜杠)
- \(反斜杠)
- |(竖线或竖线)
- ?(问号)
- *(星号)
- 整数值零,有时被称为ASCII NUL 字符。
- 其整数表示范围为1到31的字符,除对于允许这些字符的备用数据流。有关文件流的更多信息,请参阅文件流。
- 目标文件系统不允许的任何其他字符。
要解决此问题,您可能需要在非Windows系统上克隆并更正有问题的文件名。会有更好的解决方案。
Trying to clone a remote git repository (bare), I get several errors like the following, after which git stops.
error: unable to create file frozen/email/lamson/mymailserver/run/queue/mark.name/cur/1361115664.1929_1.vps-pool-55:2,S (Invalid argument)
It's okay if I have to remove these files, but I can't find a way to do that if I can't clone.
Any idea what I can do?
I guess you're probably trying to do the clone on a Windows machine. Windows doesn't allow filenames to use the :
character.
From the 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.
To work around this problem, you will probably need to clone on a non-windows system and correct the offending filenames. Maybe some of the windows experts out there will have a better solution.
这篇关于Git克隆无法创建文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!