Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Latest Update brings Github error on pull, push, or sync

In Visual Studio 2019, we have been using the GitHub extension successfully since before release. Now, all of the sudden, when we push, pull, or sync, we receive the following in the Output window:

Warning: 'C:\ProgramData/Git/config' has a dubious owner: '(unknown)'.
For security reasons, it is therefore ignored.
To fix this, please transfer ownership to an admininstrator.
like image 767
Bullfrog Software Avatar asked Aug 21 '19 13:08

Bullfrog Software


6 Answers

You should check if 'C:\ProgramData/Git/config' actually exists. If it doesn't you can just create it and paste the following into the file:

[core]
    symlinks = false
    autocrlf = true
    fscache = true
[color]
    diff = auto
    status = auto
    branch = auto
    interactive = true
[help]
    format = html
[rebase]
    autosquash = true

This worked for me.

like image 160
Chris Dueck Avatar answered Oct 04 '22 05:10

Chris Dueck


  • Select "Tools" in Visual studio
  • Select "Get_tools_and_features"-->It will open the visual studio installer
  • Click on the "Individual_components" tab in visual studio installer
  • Go to "Code_tools" and check "GitforWindows" and "GitextensionforVisualStudio"
  • Install these two to resolve this issue.

99% sure that above steps will fix the error.

like image 44
Nagendra Reddy Avatar answered Oct 04 '22 06:10

Nagendra Reddy


I fixed it by going to Visual Studio Installer, choosing individual component and searching for "Git". In my case the "Git for Windows" and "GitHub Extension for Visual Studio" was now unchecked/not installed for some reason..

These are the extensions I needed: Visual Studio Installer Git

Installing those create the ProgramData\Git\config file and the error was gone.

like image 22
Philip Küsel Avatar answered Oct 04 '22 07:10

Philip Küsel


We ran into this exact issue after upgrading Git to version 2.23.0.windows.1 on our build agents.

The fix that worked for us was to change the owner of C:\ProgramData/Git/config to Administrators. Note that this is different to the Administrator user!

To do this, right-click on C:\ProgramData/Git/config and select Properties then the Security tab.

config Properties

And click Advanced...

Advanced Security Settings for config

Use the Change link to set the owner to Administrators.

like image 39
Richard Ev Avatar answered Oct 04 '22 07:10

Richard Ev


Delete or rename the existing file at that location is also an option. It looks like it's parts of some lower level windows (or MSYS2/Cygwin) security that's brought in via libgit.lib.

Why the created file has the wrong owner is not yet known.

Who/what is the owner for that existing file? What language is in use?

It's been noted as an issue at https://github.com/git-for-windows/git/issues/2304 but isn't resolved yet.

like image 36
Philip Oakley Avatar answered Oct 04 '22 07:10

Philip Oakley


Uninstall Git and install a downgraded version. The version that shows this problem is the 2.23.0. Downgrade it to the 2.22.0 and it works fine without this problem.

Git releases: All git releases Git 2.22.0: Version without this issue

like image 40
Gabriele D'Agostino Avatar answered Oct 04 '22 07:10

Gabriele D'Agostino