Skip to content
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

Make Gitea always use its internal config, ignore /etc/gitconfig #33076

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Jan 2, 2025

In history, Gitea could use the system config /etc/gitconfig because some users said that "they might put certNonceSeed in it"

Actually, we shouldn't not use it, because it also causes conflicts (there are already some fixes like #28848)

To make the system clear, I think it's worth to introduce the breaking change: add GIT_CONFIG_NOSYSTEM=1 to all git commands.

⚠️ BREAKING ⚠️

For most users, nothing need to do.

If you have made changes to /etc/gitconfig to affect Gitea's behavior, you need to move these config options to Gitea's internal git config file, it is usually in Gitea's {AppDataPath}/home/.git directory.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 2, 2025
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 2, 2025
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Jan 2, 2025
@wxiaoguang wxiaoguang changed the title Make Gitea always use its internal config, ignore /etc/git/config Make Gitea always use its internal config, ignore /etc/gitconfig Jan 2, 2025
@wxiaoguang wxiaoguang added this to the 1.24.0 milestone Jan 2, 2025
@wxiaoguang wxiaoguang added the pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! label Jan 2, 2025
@wxiaoguang wxiaoguang force-pushed the fix-git-global-config branch from afa949f to 0201e02 Compare January 2, 2025 04:29
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 2, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 2, 2025
@lunny lunny enabled auto-merge (squash) January 2, 2025 20:01
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 2, 2025
@lunny lunny merged commit e709cc7 into go-gitea:main Jan 2, 2025
26 checks passed
lunny pushed a commit that referenced this pull request Jan 2, 2025
…33076)

In history, Gitea could use the system config `/etc/gitconfig` because
some users said that "they might put certNonceSeed in it"

Actually, we shouldn't not use it, because it also causes conflicts
(there are already some fixes like #28848)

To make the system clear, I think it's worth to introduce the breaking
change: add `GIT_CONFIG_NOSYSTEM=1` to all git commands.


## ⚠️ BREAKING ⚠️

 For most users, nothing need to do.

If you have made changes to `/etc/gitconfig` to affect Gitea's behavior,
you need to move these config options to Gitea's internal git config
file, it is usually in Gitea's `{AppDataPath}/home/.git` directory.
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jan 2, 2025
@wxiaoguang wxiaoguang deleted the fix-git-global-config branch January 3, 2025 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants