Skip to content

Trusting a repository by adding a security exception fails #11414

@bdukes

Description

@bdukes

Environment

  • Git Extensions 4.2.1.17611
  • Build b0c0b28
  • Git 2.43.0.windows.1
  • Microsoft Windows NT 10.0.22631.0
  • .NET 6.0.25
  • DPI 96dpi (no scaling)
  • Portable: False
  • Microsoft.WindowsDesktop.App Versions
    Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 8.0.0-rc.2.23479.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Issue description

When attempting to open a repository that has an ownership issue (i.e. the directory is owned by a user other than the current user), the dialog offers to add an exception to the .gitconfig to trust the repository:

Screenshot of Git security error dialog

However, I'm seeing a trailing \n being added into the .gitconfig, so that the experience is that I click to trust the repository, and then Git Extensions reloads and I still can't open the directory and get the same error dialog.

Steps to reproduce

  1. Open untrusted repository
  2. Click Trust this repository button
  3. Attempt again to open the untrusted repository

Did this work in previous version of GitExtensions?

I believe this worked in the past, but I'm not certain when.

Diagnostics

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions