Description
-
I was not able to find an open or closed issue matching what I'm seeing
Commenters to issue Git installer hangs on non-Windows drive #815 after Dec 2017 report the installer hanging, but the causes aren't clear.
Issue Install from .exe freezes, some commands won't run #1374 reports a frozen installer and broken commands; based on a few tests, my commands appear functional.
In issue Git for Windows Installer hangs #1763, the installer hangs at
mkdir
, whereas in my case it hangs atgit config
. The log omits the early line specifying whether the installer ran with administrative privileges.
Setup
-
Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options git version 2.18.0.windows.1 cpu: x86_64 built from commit: cd1a74fc9dc8a07626c216940db9a51f25206e03 sizeof-long: 4
-
Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
Windows 10 64-bit.
$ cmd.exe /c ver Microsoft Windows [Version 10.0.16299.551]
-
What options did you set as part of the installation? Or did you choose the
defaults?Editor Option: Notepad++ Path Option: Cmd SSH Option: OpenSSH CURL Option: OpenSSL CRLF Option: CRLFAlways Bash Terminal Option: ConHost Performance Tweaks FSCache: Enabled Use Credential Manager: Enabled Enable Symlinks: Disabled
-
Any other interesting things about your environment that might be related
to the issue you're seeing?None known.
Details
When I ran the installer (Git-2.18.0-64-bit.exe
) from my non-privileged user account, it did not prompt for elevated privileges but proceeded into the wizard. I accepted its proposed installation path under my AppData
directory. Once the installer's progress bar filled, the installer remained in that state for several minutes. With Process Explorer, I saw that a subprocess with the following command line was running within the C:\ProgramData\Git
directory:
"C:\Users\stan.west\AppData\Local\Programs\Git\mingw64\bin\git.exe" config -f config core.autocrlf true
After I killed that process, the installer continued and then exited after I clicked the "Finish" button on the final pane.
I expected, if that installer is intended only for system (not user) installations, that it would prompt for elevated privileges. If it may be used for user installations, I expect it not to try to modify a system configuration file at C:\ProgramData\Git\config
.
When I explicitly ran the installer as administrator, it completed without hanging and modified the system configuration file.
Cause of hanging
It appears that the cause of the installer hanging is git config
waiting on input. When I used the Command Prompt to run the command line above in the correct directory, git config
asked to retry (because it lacked privileges to modify the config file) and waited for a response:
C:\ProgramData\Git>"C:\Users\stan.west\AppData\Local\Programs\Git\mingw64\bin\git.exe" config -f config core.autocrlf true
Rename from 'C:/ProgramData/Git/config.lock' to 'C:/ProgramData/Git/config' failed. Should I try again? (y/n)
That left a new file C:\ProgramData\Git\config.lock
. When I ran the above command thereafter, git config
instead printed an error message and terminated immediately:
C:\ProgramData\Git>"C:\Users\stan.west\AppData\Local\Programs\Git\mingw64\bin\git.exe" config -f config core.autocrlf true
error: could not lock config file config: File exists
That suggests that a second run of the installer would appear to succeed, although it would have failed to alter the system configuration file.
Installer log
When I ran the installer with /log=<file>
(and with no lingering config.lock
file), the installer hung after writing the "Installation process succeeded" line and continued after I killed the git config
subprocess. The tail of the log is as follows:
2018-07-26 14:48:29.405 Creating the icon.
2018-07-26 14:48:29.410 Successfully created the icon.
2018-07-26 14:48:29.475 Installation process succeeded.
2018-07-26 14:53:05.840 Extracting temporary file: C:\Users\STAN~1.WES\AppData\Local\Temp\1\is-6364K.tmp\edit-git-bash.exe
2018-07-26 14:53:06.861 Line 2155: Executing C:\Users\stan.west\AppData\Local\Programs\Git\post-install.bat
2018-07-26 14:53:07.712 Line 2163: post-install scripts run successfully:
"running post-install"
'C:\WINDOWS\system32\drivers\etc\hosts' -> '/etc/hosts'
'C:\WINDOWS\system32\drivers\etc\protocol' -> '/etc/protocols'
'C:\WINDOWS\system32\drivers\etc\services' -> '/etc/services'
'C:\WINDOWS\system32\drivers\etc\networks' -> '/etc/networks'
2018-07-26 14:53:08.598 Need to restart Windows? No
2018-07-26 14:53:18.116 Deinitializing Setup.
2018-07-26 14:53:18.131 Log closed.