Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix archive creating LFS hooks and breaking pull requests#28848

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
lunny merged 2 commits intogo-gitea:mainfrombrechtvl:fix-lfs-archive-breaks-pr
Jan 19, 2024

Conversation

@brechtvl
Copy link
Contributor

When LFS hooks are present in gitea-repositories, operations like git push for creating a pull request fail. These repositories are not meant to include LFS files or git push them, that is handled separately. And so they should not have LFS hooks.

Installing git-lfs on some systems (like Debian Linux) will automatically set up /etc/gitconfig to create LFS hooks in repositories. For most git commands in Gitea this is not a problem, either because they run on a temporary clone or the git command does not create LFS hooks.

But one case where this happens is git archive for creating repository archives. To fix that, add a GIT_CONFIG_NOSYSTEM=1 to disable using the system configuration for that command.

According to a comment, GIT_CONFIG_NOSYSTEM is not used for all git commands because the system configuration can be intentionally set up for Gitea to use.

Resolves#19810,#21148

dav-sea reacted with thumbs up emoji
When LFS hooks are present in gitea-repositories, operations like gitpush for creating a pull request fail. These repositories are not meantto include LFS files or git push them, that is handled separately. Andso they should not have LFS hooks.Installing git-lfs on some systems (like Debian Linux) will automaticallyset up /etc/gitconfig to create LFS hooks in repositories. For most gitcommands in Gitea this is not a problem, either because they run on atemporary clone or the git command does not create LFS hooks.But one case where this happens is git archive for creating repositoryarchives. To fix that, add a GIT_CONFIG_NOSYSTEM=1 to disable using thesystem configuration for that command.According to a comment, GIT_CONFIG_NOSYSTEM is not used for all gitcommands because the system configuration can be intentionally set upfor Gitea to use.Resolvesgo-gitea#19810,go-gitea#21148
@GiteaBotGiteaBot added the lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelJan 19, 2024
@brechtvl
Copy link
ContributorAuthor

This is the case that we at Blender and others have run into, but it's difficult to check that it's really the only git command that suffers from this. More reliable would be to setGIT_CONFIG_NOSYSTEM for all Git commands, but it appears that is intentionally not done currently.

@GiteaBotGiteaBot added lgtm/need 1This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelsJan 19, 2024
@wxiaoguang
Copy link
Contributor

Quite interesting ... maybe that's why some people could reproduce while some others couldn't.

I guess Gitea should ideally ignore the system git config for all git commands, indeed Gitea is using its private/internal git config since#20114 and#19732 , I think there is no reason to make Gitea use unmanaged git config anymore.

@GiteaBotGiteaBot added lgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1This PR needs approval from one additional maintainer to be merged. labelsJan 19, 2024
@lunnylunnyenabled auto-merge (squash)January 19, 2024 05:24
@lunnylunny added the reviewed/wait-mergeThis pull request is part of the merge queue. It will be merged soon. labelJan 19, 2024
@lunnylunny merged commit1167d52 intogo-gitea:mainJan 19, 2024
@GiteaBotGiteaBot added this to the1.22.0 milestoneJan 19, 2024
@GiteaBotGiteaBot removed the reviewed/wait-mergeThis pull request is part of the merge queue. It will be merged soon. labelJan 19, 2024
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull requestJan 19, 2024
…8848)When LFS hooks are present in gitea-repositories, operations like gitpush for creating a pull request fail. These repositories are not meantto include LFS files or git push them, that is handled separately. Andso they should not have LFS hooks.Installing git-lfs on some systems (like Debian Linux) willautomatically set up /etc/gitconfig to create LFS hooks in repositories.For most git commands in Gitea this is not a problem, either becausethey run on a temporary clone or the git command does not create LFShooks.But one case where this happens is git archive for creating repositoryarchives. To fix that, add a GIT_CONFIG_NOSYSTEM=1 to disable using thesystem configuration for that command.According to a comment, GIT_CONFIG_NOSYSTEM is not used for all gitcommands because the system configuration can be intentionally set upfor Gitea to use.Resolvesgo-gitea#19810,go-gitea#21148
@GiteaBotGiteaBot added the backport/doneAll backports for this PR have been created labelJan 19, 2024
KN4CK3R pushed a commit that referenced this pull requestJan 21, 2024
…28851)Backport#28848 by@brechtvlWhen LFS hooks are present in gitea-repositories, operations like gitpush for creating a pull request fail. These repositories are not meantto include LFS files or git push them, that is handled separately. Andso they should not have LFS hooks.Installing git-lfs on some systems (like Debian Linux) willautomatically set up /etc/gitconfig to create LFS hooks in repositories.For most git commands in Gitea this is not a problem, either becausethey run on a temporary clone or the git command does not create LFShooks.But one case where this happens is git archive for creating repositoryarchives. To fix that, add a GIT_CONFIG_NOSYSTEM=1 to disable using thesystem configuration for that command.According to a comment, GIT_CONFIG_NOSYSTEM is not used for all gitcommands because the system configuration can be intentionally set upfor Gitea to use.Resolves#19810,#21148Co-authored-by: Brecht Van Lommel <brecht@blender.org>
zjjhot added a commit to zjjhot/gitea that referenced this pull requestJan 22, 2024
* giteaofficial/main:  [skip ci] Updated licenses and gitignores  Prevent anonymous container access if `RequireSignInView` is enabled (go-gitea#28877)  Don't show new pr button when page is not compare pull (go-gitea#26431)  Avoid duplicate JS error messages on UI (go-gitea#28873)  Fix branch list bug which displayed default branch twice (go-gitea#28878)  Revert adding htmx until we finaly decide to add it (go-gitea#28879)  Don't do a full page load when clicking the follow button (go-gitea#28872)  Don't do a full page load when clicking the subscribe button (go-gitea#28871)  Fix incorrect PostgreSQL connection string for Unix sockets (go-gitea#28865)  Run `npm audit fix` (go-gitea#28866)  Fix migrate storage bug (go-gitea#28830)  Set the `isPermaLink` attribute to `false` in the `guid` sub-element (go-gitea#28860)  In administration documentation about environment variables, point to those for the Go runtime instead of Go compiler (go-gitea#28859)  Move doctor package from modules to services (go-gitea#28856)  Add support for sha256 repositories (go-gitea#23894)  Fix incorrect action duration time when rerun the job before executed once (go-gitea#28364)  Fix some RPM registry flaws (go-gitea#28782)  tests: missing refs/ in bare repositories (go-gitea#28844)  Fix archive creating LFS hooks and breaking pull requests (go-gitea#28848)
henrygoodman pushed a commit to henrygoodman/gitea that referenced this pull requestJan 31, 2024
…8848)When LFS hooks are present in gitea-repositories, operations like gitpush for creating a pull request fail. These repositories are not meantto include LFS files or git push them, that is handled separately. Andso they should not have LFS hooks.Installing git-lfs on some systems (like Debian Linux) willautomatically set up /etc/gitconfig to create LFS hooks in repositories.For most git commands in Gitea this is not a problem, either becausethey run on a temporary clone or the git command does not create LFShooks.But one case where this happens is git archive for creating repositoryarchives. To fix that, add a GIT_CONFIG_NOSYSTEM=1 to disable using thesystem configuration for that command.According to a comment, GIT_CONFIG_NOSYSTEM is not used for all gitcommands because the system configuration can be intentionally set upfor Gitea to use.Resolvesgo-gitea#19810,go-gitea#21148
nrdufour added a commit to nrdufour/home-ops that referenced this pull requestFeb 4, 2024
This PR contains the following updates:| Package | Update | Change ||---|---|---|| [docker.io/gitea/gitea](https://github.com/go-gitea/gitea) | patch | `1.21.4` -> `1.21.5` |---### Release Notes<details><summary>go-gitea/gitea (docker.io/gitea/gitea)</summary>### [`v1.21.5`](https://github.com/go-gitea/gitea/releases/tag/v1.21.5)[Compare Source](go-gitea/gitea@v1.21.4...v1.21.5)-   SECURITY    -   Prevent anonymous container access if `RequireSignInView` is enabled ([#&#8203;28877](go-gitea/gitea#28877)) ([#&#8203;28882](go-gitea/gitea#28882))    -   Update go dependencies and fix go-git ([#&#8203;28893](go-gitea/gitea#28893)) ([#&#8203;28934](go-gitea/gitea#28934))-   BUGFIXES    -   Revert "Speed up loading the dashboard on mysql/mariadb ([#&#8203;28546](go-gitea/gitea#28546))" ([#&#8203;29006](go-gitea/gitea#29006)) ([#&#8203;29007](go-gitea/gitea#29007))    -   Fix an actions schedule bug ([#&#8203;28942](go-gitea/gitea#28942)) ([#&#8203;28999](go-gitea/gitea#28999))    -   Fix update enable_prune even if mirror_interval is not provided ([#&#8203;28905](go-gitea/gitea#28905)) ([#&#8203;28929](go-gitea/gitea#28929))    -   Fix uploaded artifacts should be overwritten ([#&#8203;28726](go-gitea/gitea#28726)) backport v1.21 ([#&#8203;28832](go-gitea/gitea#28832))    -   Preserve BOM in web editor ([#&#8203;28935](go-gitea/gitea#28935)) ([#&#8203;28959](go-gitea/gitea#28959))    -   Strip `/` from relative links ([#&#8203;28932](go-gitea/gitea#28932)) ([#&#8203;28952](go-gitea/gitea#28952))    -   Don't remove all mirror repository's releases when mirroring ([#&#8203;28817](go-gitea/gitea#28817)) ([#&#8203;28939](go-gitea/gitea#28939))    -   Implement `MigrateRepository` for the actions notifier ([#&#8203;28920](go-gitea/gitea#28920)) ([#&#8203;28923](go-gitea/gitea#28923))    -   Respect branch info for relative links ([#&#8203;28909](go-gitea/gitea#28909)) ([#&#8203;28922](go-gitea/gitea#28922))    -   Don't reload timeline page when (un)resolving or replying conversation ([#&#8203;28654](go-gitea/gitea#28654)) ([#&#8203;28917](go-gitea/gitea#28917))    -   Only migrate the first 255 chars of a Github issue title ([#&#8203;28902](go-gitea/gitea#28902)) ([#&#8203;28912](go-gitea/gitea#28912))    -   Fix sort bug on repository issues list ([#&#8203;28897](go-gitea/gitea#28897)) ([#&#8203;28901](go-gitea/gitea#28901))    -   Fix `DeleteCollaboration` transaction behaviour ([#&#8203;28886](go-gitea/gitea#28886)) ([#&#8203;28889](go-gitea/gitea#28889))    -   Fix schedule not trigger bug because matching full ref name with short ref name ([#&#8203;28874](go-gitea/gitea#28874)) ([#&#8203;28888](go-gitea/gitea#28888))    -   Fix migrate storage bug ([#&#8203;28830](go-gitea/gitea#28830)) ([#&#8203;28867](go-gitea/gitea#28867))    -   Fix archive creating LFS hooks and breaking pull requests ([#&#8203;28848](go-gitea/gitea#28848)) ([#&#8203;28851](go-gitea/gitea#28851))    -   Fix reverting a merge commit failing ([#&#8203;28794](go-gitea/gitea#28794)) ([#&#8203;28825](go-gitea/gitea#28825))    -   Upgrade xorm to v1.3.7 to fix a resource leak problem caused by Iterate ([#&#8203;28891](go-gitea/gitea#28891)) ([#&#8203;28895](go-gitea/gitea#28895))    -   Fix incorrect PostgreSQL connection string for Unix sockets ([#&#8203;28865](go-gitea/gitea#28865)) ([#&#8203;28870](go-gitea/gitea#28870))-   ENHANCEMENTS    -   Make loading animation less aggressive ([#&#8203;28955](go-gitea/gitea#28955)) ([#&#8203;28956](go-gitea/gitea#28956))    -   Avoid duplicate JS error messages on UI ([#&#8203;28873](go-gitea/gitea#28873)) ([#&#8203;28881](go-gitea/gitea#28881))    -   Bump `@github/relative-time-element` to 4.3.1 ([#&#8203;28819](go-gitea/gitea#28819)) ([#&#8203;28826](go-gitea/gitea#28826))-   MISC    -   Warn that `DISABLE_QUERY_AUTH_TOKEN` is false only if it's explicitly defined ([#&#8203;28783](go-gitea/gitea#28783)) ([#&#8203;28868](go-gitea/gitea#28868))    -   Remove duplicated checkinit on git module ([#&#8203;28824](go-gitea/gitea#28824)) ([#&#8203;28831](go-gitea/gitea#28831))Instances on **[Gitea Cloud](https://cloud.gitea.com)** will be automatically upgraded to this version during the specified maintenance window.</details>---### Configuration📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.🔕 **Ignore**: Close this PR and you won't be reminded about this update again.--- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box---This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xNjUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE2NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->Reviewed-on:https://git.home/nrdufour/home-ops/pulls/355Co-authored-by: Renovate <renovate@ptinem.io>Co-committed-by: Renovate <renovate@ptinem.io>
silverwind pushed a commit to silverwind/gitea that referenced this pull requestFeb 20, 2024
…8848)When LFS hooks are present in gitea-repositories, operations like gitpush for creating a pull request fail. These repositories are not meantto include LFS files or git push them, that is handled separately. Andso they should not have LFS hooks.Installing git-lfs on some systems (like Debian Linux) willautomatically set up /etc/gitconfig to create LFS hooks in repositories.For most git commands in Gitea this is not a problem, either becausethey run on a temporary clone or the git command does not create LFShooks.But one case where this happens is git archive for creating repositoryarchives. To fix that, add a GIT_CONFIG_NOSYSTEM=1 to disable using thesystem configuration for that command.According to a comment, GIT_CONFIG_NOSYSTEM is not used for all gitcommands because the system configuration can be intentionally set upfor Gitea to use.Resolvesgo-gitea#19810,go-gitea#21148
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsMar 8, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@lunnylunnylunny approved these changes

@wxiaoguangwxiaoguangwxiaoguang approved these changes

Assignees

No one assigned

Labels

backport/doneAll backports for this PR have been createdlgtm/doneThis PR has enough approvals to get merged. There are no important open reservations anymore.type/bug

Projects

None yet

Milestone

1.22.0

Development

Successfully merging this pull request may close these issues.

Some Git LFS hooks keep reappearing server-side

4 participants

@brechtvl@wxiaoguang@lunny@GiteaBot

[8]ページ先頭

©2009-2025 Movatter.jp