Skip to content

Gitea can overwrite users gitconfig when using XDG spec #33039

Closed
@TheFox0x7

Description

@TheFox0x7

Description

Finally tracked that one, I was wondering why git tests always used my local config and messed with it.

If user has $XDG_CONFIG_HOME/git/config file and the XDG_CONFIG_HOME variable is set, gitea uses it both for run and tests.

I see two solutions for this:

  1. Set XDG_CONFIG_HOME in commonBaseEnvs
  2. Unset XDG_CONFIG_HOME in gitea

First option has the downside of hardcoding the value of the variable.

Git config manual page for reference

Gitea Version

a92f505

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

self-built

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions