How to Increase Attachment File Size Limit in GitLab
- What is Hosted OpenShift Cluster - March 16, 2021
- 5 Mistakes You Should Avoid During Kubernetes Exam - March 12, 2021
- DevOps Engineer Skills – Most Demanding DevOps Skills You Should Learn in 2021 - February 2, 2021
We know GitLab is one of the best and easy to use git server solutions available in the market now. And GitLab CE is available as free and we can simply spin up a VM and set up our own Git server with all features. We can fine tune the GitLab server as needed and based on organization policies and this must be done if you are using this in production.
Let me explain a common scenario. While using our internal GitLab server, we received complaints that users are not able to upload large files from GUI and unable to proceed with deployment using the repositories.
So, we tested the scenario; from the GUI, we selected the Upload file option.
Upload Window will popup
Choose the file from the file browser window
Hey, users are right; there is an error as the Popup window shows a warning and says “Maximum File Size 10MB!”
Aaah, now I remember; we forgot to set this parameter for this git server.
So, we need to login as a root user (or any user with Admin access) via the same GitLab GUI from a browser. Then we open Admin configurations for GitLab server.
Goto Settings -> General
And expand Accounts & Limits settings. Here you can see, the default File upload size is limited to 10MB; no wonder.
I have updated the value to 100MB as shown in the image – yes that is enough for now.
And don’t forget to Save the configuration
So, I came to my login (you can do it from root login as well; no difference) to verify the same.
And yes, no error this time and the file is uploading.
And finally we can upload the file which is larger than 10MB is already uploaded.