Skip to content

Error while update installation #2524

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tsfg opened this issue Feb 21, 2020 · 5 comments
Closed

Error while update installation #2524

tsfg opened this issue Feb 21, 2020 · 5 comments

Comments

@tsfg
Copy link

tsfg commented Feb 21, 2020

  • [ x] I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

2.25.1 but same was at the last update to 2.25.0

git version 2.25.1.windows.1
cpu: x86_64
built from commit: cceb69da75b4906bb04cfb3a2f7f37b12b985ec3
sizeof-long: 4
sizeof-size_t: 8

  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [Version 6.1.7601]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

Editor Option: VIM
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
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?

German UI Language for Windows

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

bash

Automated Update
  • What did you expect to occur after running these commands?

Smooth git ;-)

  • What actually happened instead?

I got several Windows showing errors during (at the end) the setup executes.
The first one :

"Unable to set system config "diff.astextplain.textcomv":="astextplain": exit code 1
stderr:
 Access denied (this line in German)

Following I get the similar message 4 times on different "values".
Then an error window : Unable to set system config defaults
Afterwards
The first one :

"Unable to set system config "http.sslBackend":="openssl": exit code 1
stderr:
 Access denied (this line in German) 

and another 7 similar.

As I open a bash the first lines (for each new opened bash) are:

chmod: changing permissions of '/dev/shm': Permission denied
chmod: changing permissions of '/dev/mqueue': Permission denied
ln: failed to create symbolic link '/etc/mtab': Permission denied
'C:\Windows\system32\drivers\etc\hosts' -> '/etc/hosts'
/usr/bin/cp: cannot create regular file '/etc/hosts': Permission denied
'C:\Windows\system32\drivers\etc\protocol' -> '/etc/protocols'
/usr/bin/cp: cannot create regular file '/etc/protocols': Permission denied
'C:\Windows\system32\drivers\etc\services' -> '/etc/services'
/usr/bin/cp: cannot create regular file '/etc/services': Permission denied
'C:\Windows\system32\drivers\etc\networks' -> '/etc/networks'
/usr/bin/cp: cannot create regular file '/etc/networks': Permission denied
rm: cannot remove '/etc/post-install/01-devices.post': Permission denied
rm: cannot remove '/etc/post-install/03-mtab.post': Permission denied
rm: cannot remove '/etc/post-install/06-windows-files.post': Permission denied
rm: cannot remove '/etc/post-install/99-post-install-cleanup.post': Permission denied
  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

./.

@dscho
Copy link
Member

dscho commented Feb 21, 2020

* [ x] I was not able to find an [open](https://github.com/git-for-windows/git/issues?q=is%3Aopen) or [closed](https://github.com/git-for-windows/git/issues?q=is%3Aclosed) issue matching what I'm seeing

I was: #2384

Just like in #2384, I have many questions. Can you tell me more about your setup? The problem is definitely not occurring here, and judging by the scarcity of bug reports, most users do not experience this problem. So there must be something special in your setup, and once we learn what is the culprit, we will be in a much better position to fix this bug, once and for all.

@tsfg in addition to racking your brain for details about your setup that might be non-mainstream, could you kindly follow the instructions at #2384 (comment) to investigate further?

@tsfg
Copy link
Author

tsfg commented Feb 21, 2020

O.K. I wasn't aware of all the hundreds of issues before and searches didn't find this issue.
As I scrolled over 2383, it looks like there are some parallels.

The Windows 7 is long time running. Means, there are at least 4 years no fresh installation. But it has all actual patches including Microsoft Defence.

In which manner you think of specialties of my system?

All git-related paths are default.: Git is installed to C:\Program Files\Git\bin
Windows path is default : c:\windows

I looked for the git config and compared it to the screenshots of the error messages I took before:
All settings seem to be like they should be:

git config --list --show-origin
file:C:/Program Files/Git/etc/gitconfig diff.astextplain.textconv=astextplain
file:C:/Program Files/Git/etc/gitconfig filter.lfs.clean=git-lfs clean -- %f
file:C:/Program Files/Git/etc/gitconfig filter.lfs.smudge=git-lfs smudge -- %f
file:C:/Program Files/Git/etc/gitconfig filter.lfs.process=git-lfs filter-process
file:C:/Program Files/Git/etc/gitconfig filter.lfs.required=true
file:C:/Program Files/Git/etc/gitconfig http.sslbackend=openssl
file:C:/Program Files/Git/etc/gitconfig http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
file:C:/Program Files/Git/etc/gitconfig core.autocrlf=true
file:C:/Program Files/Git/etc/gitconfig core.fscache=true
file:C:/Program Files/Git/etc/gitconfig core.symlinks=false
file:C:/Program Files/Git/etc/gitconfig credential.helper=manager
.
.
.

Last time, if I remember correct, I uninstalled git and after a reboot reinstalled it again and everything was fine until today the next update came up.

As I have at the moment (until April) only a little time to start a bug fixing project ...
I tried a self-made installer with cmd-test.iss posted in #2384 (comment) but the resulting installer exited without doing anything beside opening the two files config-set.err and config-set.out in a random Folder in Temp and in a subfolder of these _setup64.tmp.
The first two files stay empty until the exit of the installer the _setup64.tmp gets some contents. All files and the Temp-Folder then are deleted on exit of the installer.
I'll try to answer your questions as good as I can meanwhile.
I think, when I do the reinstallation now. The bash-messages-issue will vanish again.
Do you have ideas on going ahead? I would try the reinstallation process as a next step...

@tsfg
Copy link
Author

tsfg commented Feb 21, 2020

First I did an "overinstallation" (reinstall without uninstall) and before the reboot the messages at star of a bash had gone already. (I stopped the automatically introduced restart and did it afterwards manually)
But even this "overinstallation" showed the already described Unable to set system config... error messages.
Any idea about the difference?
The installation after a compete remove (uninstall) an installation was without any problems.

@dscho
Copy link
Member

dscho commented Feb 24, 2020

In which manner you think of specialties of my system?

Anything that is different from more common setups (which do work). You listed one: you're running Windows 7. Or is it 2008R2?

Other things I could imagine your setup has that other setups do not have: maybe Virtual Store is active for C:\Program Files (i.e. can you write into that directory as a regular user without getting a "permission denied" error)? Do you have an anti-malware? Do you have an AMD graphics adapter?

I tried a self-made installer with cmd-test.iss posted in #2384 (comment) but the resulting installer exited without doing anything beside opening the two files config-set.err and config-set.out in a random Folder in Temp and in a subfolder of these _setup64.tmp.
The first two files stay empty until the exit of the installer the _setup64.tmp gets some contents. All files and the Temp-Folder then are deleted on exit of the installer.

That's strange. Maybe you can modify the script so that it creates a directory within the C:\Program Files\Git directory structure and then uses git config's `-f`` option to write into it?

@dscho
Copy link
Member

dscho commented Feb 24, 2020

The installation after a compete remove (uninstall) an installation was without any problems.

Hmm. That is very strange. The upgrade actually runs an uninstall before a new install. If you rebooted after uninstalling, the only thing I could think of is that some process held a handle to the system gitconfig for one reason or another, that the uninstaller then "removed" that file (but since the handle is still open, the file cannot be created in Windows until the process that holds that handle open goes away, which a reboot does accomplish).

@dscho dscho closed this as completed Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants