> 技术文档 > git 安装报错:Unable to set system config “diff.astextplain.textconv“: “astextplain“exit code 128

git 安装报错:Unable to set system config “diff.astextplain.textconv“: “astextplain“exit code 128


Windows安装git的时候,遇到如下错误信息:Unable to set system config “diff.astextplain.textconv”: \"astextplain\"exit code 128
stderr.
fatal: could not open ‘/dev/null’ for reading and writing: No such file ordirectory

git 安装报错:Unable to set system config “diff.astextplain.textconv“: “astextplain“exit code 128

一、问题分析

导致这个问题的主要原因,是因为系统注册表损坏了,导致git在安装过程中,无法正常的安装。
如果你也遇到同样的错误,本文将非常具有参考价值。

二、解决办法

通过cmd打开注册表管理器

regedit

找到位置:计算机\\HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Services\\Null
有可能,你的Null目录是不存在的,这个时候,需要手动场景一个Null目录,然后将右侧的参数手动加入进去。