After installing git, an error is reported in vscode that git cannot be found:
Find git in C:/program files/git/bin/git.exe
Find git in C: \ program files \ git \ CMD \ git.exe
Find git in C: \ program files (x86) \ git \ CMD \ git.exe
Find git in C: \ program files \ git \ CMD \ git.exe
Find git in C: \ users \ administrator \ appdata \ local \ programs \ git \ CMD \ git.exe
Git installation not found.
Then find the GIT directory and open the two files:
Enter git — version in CMD, and the same error will be reported:
Microsoft Windows [version 10.0.16299.15]
(c) 2017 Microsoft Corporation。 All rights reserved
C:\windows\system32> git -version
fatal: open /dev/null or dup failed: No such file or directory
Solution:
The reason I found it on the Internet is that there is a problem with the null.sys file under C: \ windows \ system32 \ drivers, so I found another null.sys on the network disk to replace the original one, and then restart the computer
Network disk address of null.sys https://pan.baidu.com/s/1kwKmnHSBjfonHUFenveXAA (it can also be found in my network disk – related GIT). Of course, this solution is limited to win10
(also, the command used to check the GIT version is: git — version, with two bars)
Similar Posts:
- This network connection does not exist
- Solve the problem of link: fatal error LNK1104: unable to open the file “d3dx9. Lib”
- How to Solve .NET 6 running on win7 SP1 error
- [Solved] Windows SDK Fails to Install with Return Code 5100
- How to fix Windows 10 camera crash and BSOD spuvcbv64.sys error
- Android SDK manager can’t be updated and can’t be connected dl.google.com The question of
- The solution of “the windows SDK version for 8.1 was not found” in vs2017 C + + compilation
- Error link: fatal error lnk1158: unable to run ‘RC. Exe’
- Android SDK manager can’t be updated to solve the problem that dl.google.com can’t be connected
- Solutions to problems such as failed to load the hostfxr.dll of. Net core SDK after Windows system installation