Getting errors when using GitHub for Windows

前端 未结 3 820
借酒劲吻你
借酒劲吻你 2021-01-12 06:29

I suddenly got errors when I was using git last week, for no apparent reason. I only have access to a windows PC.

The errors I\'m getting doesn\'t seem to give me an

3条回答
  •  伪装坚强ぢ
    2021-01-12 06:57

    I encountered the same problem on my laptop and I spent a lot of time to understand and to solve it. Here is my experience.

    The git error message (Couldn't open /dev/null (or dup failed) : No such file or directory) is a linux/unix one. In fact, what git is trying to say is that it cannot access to the null device of your system. In windows, there is a actually a null device that corresponds to an empty and invisible file, present in each folder.

    1. Here you can open a window console (cmd) and type the command echo sample > nul. If you get an error message, you actually have a problem with your null device.

    2. Identifying the problem :

      • Open the Device Manager
      • Menu View > Show hidden devices
      • Search for Null in Non-Plug and Play Drivers
    3. If it exists but is in warning, try this (source) :

      • Control Panel > Power Options
      • Change Plan Settings
      • Change Advanced Power Settings
      • Multimedia Settings
      • When sharing media > Setting : a setting other than Allow the Computer to Enter Away Mode
      • Restart the computer : if the problem continues, I would suggest you to backup the %SystemRoot%\system32\drivers\null.sys, remove the Null device (Right click > Uninstall) and go the the step 4.
    4. If it doesn't exist (or the step 3 doesn't repair the problem and after removing the Null device) :

      • Install the Null device by following this How-To (for Windows XP but it also works for Vista).
      • Restart the computer.

提交回复
热议问题