Windows GIT-执行GIT init时出错

Windows GIT-执行GIT init时出错,windows,git,Windows,Git,在Windows虚拟机的GitBash中执行git init时,一名开发人员出现以下错误: 一审 error: could not write config file //xxx/yyy/.git/config: Function not implemented Fatal: could not set 'core.symlinks' to false error: could not write config file //xxx/yyy/.git/config: Function not

在Windows虚拟机的GitBash中执行
git init
时,一名开发人员出现以下错误:

  • 一审

    error: could not write config file //xxx/yyy/.git/config: Function not implemented
    Fatal: could not set 'core.symlinks' to false
    
    error: could not write config file //xxx/yyy/.git/config: Function not implemented
    Fatal: could not set 'core.repositoryformatversion' to '0'
    
  • 二审

    error: could not write config file //xxx/yyy/.git/config: Function not implemented
    Fatal: could not set 'core.symlinks' to false
    
    error: could not write config file //xxx/yyy/.git/config: Function not implemented
    Fatal: could not set 'core.repositoryformatversion' to '0'
    
  • 但是,同一虚拟机中的另一个开发人员没有问题。 他能够执行
    git init
    git add
    git commit
    git push

    如果您有相同的问题并发现了解决方案,请提供帮助

    这通常是由权限错误引起的。

    因此,一个开发人员能够使用git,而另一个开发人员不能使用git是有道理的。
    检查您的文件夹(git repository folder)权限,并验证给定用户是否能够将内容写入此文件夹。(检查给定文件夹及其父文件夹的权限)

    另一个选项(可能是但不太可能是)是防病毒软件阻止您更改文件夹

    (添加到@CodeWizard的答案中)

    在文件夹中创建repo时:git在目录的底部创建一个
    .git/
    文件夹,然后处理该文件夹中的文件

    • 检查是否确实创建了此文件夹(例如,在shell中键入
      dir//xxx/yyy/.git
    • 检查此
      .git/
      文件夹上的访问权限(“属性窗口的安全”选项卡)

    当VM禁用Trend Micro时,错误消失。我不知道为什么启用Trend Micro时某些文件夹没有错误。因此,Trend Micro的配置可能有所不同。

    函数未实现错误来自文件系统操作(打开、写入或关闭系统调用)。这表明虚拟机设置错误,计算机出于某种原因拒绝在该虚拟机中写入文件。Git本身无法找到原因;你必须去别处看看。嗨,LeGEC,.git文件夹没有创建。我尝试执行“chmoda+rwx”(其中.git文件夹应该驻留),然后再次尝试“git init”。但是没有创建.git文件夹,并且出现了相同的错误。安装程序是在Windows虚拟机上进行的,我认为git bash中的chmod不能像您预期的那样工作。检查我们今天早上在Windows下检查的Windows系统(“目标文件夹的属性”)的访问权限。开发人员拥有完全访问权限。我们最近遭到恶意软件攻击。我不确定这是否是原因。但是,对于同一虚拟机上的第二个开发人员来说没有问题。用户可以在文件夹中存放代码和修改,因此可以编写。但是当执行“git init”时,出现错误“无法写入配置文件//xxx/yyy/.git/config:Function not implemented”