Latest Update brings Github error on pull, push, o

2020-05-20 03:43发布

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.

10条回答
不美不萌又怎样
2楼-- · 2020-05-20 04:26

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.

查看更多
Viruses.
3楼-- · 2020-05-20 04:27

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.

查看更多
祖国的老花朵
4楼-- · 2020-05-20 04:29
  • 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.

查看更多
forever°为你锁心
5楼-- · 2020-05-20 04:29

I had this problem with Git 2.24.0.2 and visual studio 2019 - 16.2.3. I couldnt create the path and config file in c:/ProgramData/git/, as I dont have admin rights. It turned out that the windows credentials stored are expired for my user account and when updated using control panel > user accounts > credential manager > Generic credentials for git helped to resolve the issue in my case

查看更多
登录 后发表回答