8000 Allow repository admin to manually trigger Git GC · Issue #5720 · gogs/gogs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Allow repository admin to manually trigger Git GC #5720

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

Open
1 task
johnss opened this issue Jun 6, 2019 · 5 comments
Open
1 task

Allow repository admin to manually trigger Git GC #5720

johnss opened this issue Jun 6, 2019 · 5 comments
Assignees
Labels
🎯 feature Categorizes as related to a new feature 🔒 security Categorizes as related to security

Comments

@johnss
Copy link
johnss commented Jun 6, 2019

i try to rewrite history to delete sensitive data with git filter-branch and pushed to server

To Reproduce
when i try to go https://example.com/user/repo/commits/master it do not exist but if i know the sha1 hash visiting https://example.com/user/repo/commit/SHA1 it still exist

Expected behavior
it should not exist, as it can cause security issue

Screenshots

Additional context

  • Can you reproduce the bug at https://try.gogs.io:

    • No: because i think this happen on all version and all sites
  • Log gist (usually found in log/gogs.log):

@unknwon unknwon added 🔨 enhancement Make it better, faster 🔒 security Categorizes as related to security status: needs feedback Tell me more about it labels Aug 12, 2019
@unknwon
Copy link
Member
unknwon commented Aug 12, 2019

Hi,

I think you have to do git gc on the repositories to let Git cleans up the data.

Gogs performs it regularly (if you turned on, I think default is once per 24hrs) or you can manually trigger it via /admin panel:

image

@johnss
Copy link
Author
johnss commented Aug 13, 2019

i doesnt have access to a CLI because i on mobile, app such as https://play.google.com/store/apps/details?id=com.aor.pocketgit dont provide a way to execute git gc , when using Android i always edit repos via web editor, /admin only allow admin or site owner and seems will execute git gc on all repos every user have, i need git gc via web GUI via repository setting that will only garbage collect single repo, GitBucket already implement this feature and i hope Gogs will in the future version gitbucket/gitbucket#1212

@unknwon
Copy link
Member
unknwon commented Aug 13, 2019

i doesnt have access to a CLI because i on mobile, app such as play.google.com/store/apps/details?id=com.aor.pocketgit dont provide a way to execute git gc

Maybe I wasn't clear, you would have to git gc on the server you run Gogs.

/admin only allow admin or site owner and seems will execute git gc on all repos every user have, i need git gc via web GUI via repository setting that will only garbage collect single repo, GitBucket already implement this feature and i hope Gogs will in the future version gitbucket/gitbucket#1212

I can turn this ticket into a feature request to add GC option in repo settings, if that's what you want?

@johnss
Copy link
Author
johnss commented Aug 13, 2019

Maybe I wasn't clear, you would have to git gc on the server you run Gogs.

So just to delete history i need to be an admin for example if i have an account on try.gogs.io i must have an access to the server username and password and login via SSH to run git gc? Seems git gc only work for site owner and not for ordinary user, for ordinary user need to contact admin just to run git gc?

I can turn this ticket into a feature request to add GC option in repo settings, if that's what you want?

Yes obviously, because there is no way to run git gc for ordinary user

@unknwon unknwon added 🎯 feature Categorizes as related to a new feature and removed 🔨 enhancement Make it better, faster status: needs feedback Tell me more about it labels Aug 14, 2019
@unknwon unknwon added this to the 0.12 milestone Aug 14, 2019
@unknwon unknwon changed the title Dangling commit still exists via SHA1 hash Allow repository admin to manually trigger Git GC Aug 14, 2019
@unknwon unknwon modified the milestones: 0.13, 0.12 Jan 28, 2020
@unknwon unknwon self-assigned this Jan 31, 2020
@unknwon unknwon mentioned this issue Feb 24, 2020
@unknwon
Copy link
Member
unknwon commented Feb 24, 2020

#3861 (comment)

git prune
git gc --aggressive

@unknwon unknwon modified the milestones: 0.12, Triaging priority Mar 17, 2020
@unknwon unknwon removed this from the Triaging priority milestone Mar 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎯 feature Categorizes as related to a new feature 🔒 security Categorizes as related to security
Projects
None yet
Development

No branches or pull requests

2 participants
0