我试图在Docker容器(Windows Nano)的上下文中运行Atlassian BitKeeper。 主目录存储在容器的上下文之外。 因此,这是作为一个符号链接在里面。
使用包含在符号链接目录中的存储库运行git init
导致错误:
Invalid path '/ContainerMappedDirectories': No such file or directory.
这是符号链接的根目录列表部分:
03/09/2017 02:22 PM <SYMLINKD> host [\\?\ContainerMappedDirectories\06928B3D-65E2-4BA6-AADB-7851FD273002]
我忍受着在Docker容器中运行Jenkins(使用Git)的问题。 这曾经为我工作,但一些Git更新后停止,所以我比较几个版本,我注意到,在容器内工作的最后一个版本是2.11.1。
这里是证明 – 从docker主机挂载C:\ temp:
06/06/2017 04:44 PM <SYMLINKD> temp [\\?\ContainerMappedDirectories\3090B08B-4EA2-49CB-8C30-227E982EC311]
尝试2.11.1:
PS C:\Program Files\git\bin> .\git.exe --version git version 2.11.1.windows.1 PS C:\Program Files\git\bin> .\git.exe init C:\temp\git11.1\ Initialized empty Git repository in C:/temp/git11.1/.git/
尝试使用2.12.1:
PS C:\Program Files\Git\bin> .\git.exe --version git version 2.12.1.windows.1 PS C:\Program Files\Git\bin> .\git.exe init C:\temp\git12.1\ fatal: Invalid path '/ContainerMappedDirectories': No such file or directory
和MinGit一样:
PS C:\> .\Min\MinGit-2.13.0-64-bit\cmd\git.exe init C:\temp\MinGitRepo\ fatal: Invalid path '/ContainerMappedDirectories': No such file or directory PS C:\> .\Min\MinGit-2.11.1-64-bit\cmd\git.exe init C:\temp\MinGitRepo\ Initialized empty Git repository in C:/temp/MinGitRepo/.git/
很难说什么改变了,我会深入了解Git changelog,至于现在使用2.11.1似乎是一个体面的解决方法。 让我知道,如果它为你工作。