Comments (2)
Hey @dkrishnan7hub, that's a good question 🚀
Regarding the following statement:
... the file thats exceeding the size limit is within the .git folder
.git\objects\31\c3dd7f2bf911dc68461ec6cbff002d9cce017d
The feature only blocks files above a configured size limit from being pushed to the remote repository, but doesn't prevent you from creating and committing such files locally.
In your case, you most likely created and committed such a limit exceeding file locally, and where you were trying to push it, gitness blocked it (I assume the folder you were referring to was your local clone, as the .git
folder indicates it's not a bare repo)
There's a few ways you can resolve your problem:
1. Remove the file that's exceeding the file limit
In case the file was committed by accident, or isn't really needed, you can remove the file to resolve the problem.
For that you'll have to remove the file from every commit in which the file exceeds the limit, which might be harder depending on how far back it is in your local commit history. In your case, it seems there's only one version of the file that's exceeding the size limit (e.g. 31c3dd7f2bf911dc68461ec6cbff002d9cce017d
)
Some useful commands:
- find commits on your branch that added the object:
git log --find-object=31c3dd7f2bf911dc68461ec6cbff002d9cce017d
- find the file path(s) of the object for a given commit:
git ls-tree -r COMMIT_SHA | grep 31c3dd7f2bf911dc68461ec6cbff002d9cce017d
- If the object was introduced with the most recent commit, you can just remove the file and then
git commit --amend
to update the latest commit. However, if the object was introduced further in your commit history, it can get more tricky to do manually.
After you've removed ALL occurrences of the file (e.g. git log --find-object=31c3dd7f2bf911dc68461ec6cbff002d9cce017d
returns an empty response), you should then be able to push your branch without any issues.
2 Decrease the file size
If you can't remove the file, but it's possible to reduce it's size, you can follow the same steps as above, but instead of removing the file from ALL commits where it exceeds the limit, you'll have to update it.
3. Increase the file size limit for the repo
If the file is necessary and can't be removed or decreased in size, you can update the max file size limit of the repository.
This will only update the limit for that specific repository, other repositories will still maintain their previous limit (100MB by default).
There's no UI support as of now, so you'll have to use the following API:
curl '{GITNESS_ENDPOINT}/api/v1/repos/{REPO_PATH}/+/settings/general' \
-H 'Authorization: XXX' \
-X PATCH \
--data '{
"file_size_limit": 1000000
}'
NOTE: limit is in Bytes, above is the default value
You can then verify the new limit has been set correctly by making the following API call:
curl '{GITNESS_ENDPOINT}/api/v1/repos/{REPO_PATH}/+/settings/general' \
-H 'Authorization: XXX'
from gitness.
Closing this issue for now, feel free to reopen if there's a related issue.
from gitness.
Related Issues (20)
- Deploying Code on Different Runners based on Branches in Drone CI/CD HOT 1
- Helm chart missing index file HOT 1
- Opensource Website? HOT 1
- Git HTTPS Protocol - New Branch Creation Rule Not Blocking Push from CLI but Works via UI HOT 2
- Project and repo deletion actually do not delete the db spaces + repos, and do not free disk space HOT 1
- Pipeline Only Mode HOT 1
- Bug: Improve public repositories experience when visited HOT 1
- Feature request: explore tab
- Using drone is a real pain
- Gitness Integration with Open Source Dev Environment Manager. HOT 2
- Gitness Integration support HOT 1
- Gitness Api HOT 3
- using pipelines with Docker-in-Docker samples, Error: mount: permission denied
- Gitness - Unauthenticated Git Pulls HOT 1
- Bug: browse the files within the "search" directory. HOT 2
- Bug: After delete the project, the menu still shows the deleted projects.
- Feature Request: MFA or external authentication via OAuth2/OIDC
- Feature Request: Support for Displaying the Webhook Execution List HOT 1
- Error: pipelines clone
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitness.