stage | group | info | type |
---|---|---|---|
Create |
Source Code |
To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments |
reference |
You can change the maximum file size for attachments in comments and replies in GitLab.
Navigate to Admin Area (wrench icon) > Settings > General, then expand Account and Limit.
From here, you can increase or decrease by changing the value in Maximum attachment size (MB)
.
NOTE: Note: If you choose a size larger than what is currently configured for the web server, you will likely get errors. See the troubleshooting section for more details.
You can change the maximum push size for your repository.
Navigate to Admin Area (wrench icon) > Settings > General, then expand Account and Limit.
From here, you can increase or decrease by changing the value in Maximum push size (MB)
.
You can change the maximum file size for imports in GitLab.
Navigate to Admin Area (wrench icon) > Settings > General, then expand Account and Limit.
From here, you can increase or decrease by changing the value in Maximum import size (MB)
.
NOTE: Note: If you choose a size larger than what is currently configured for the web server, you will likely get errors. See the troubleshooting section for more details.
Repositories within your GitLab instance can grow quickly, especially if you are using LFS. Their size can grow exponentially, rapidly consuming available storage.
To avoid this from happening, you can set a hard limit for your repositories' size. This limit can be set globally, per group, or per project, with per project limits taking the highest priority.
There are numerous use cases where you might set up a limit for repository size. For instance, consider the following workflow:
- Your team develops apps which require large files to be stored in the application repository.
- Although you have enabled Git LFS to your project, your storage has grown significantly.
- Before you exceed available storage, you set up a limit of 10 GB per repository.
Only a GitLab administrator can set those limits. Setting the limit to 0
means
there are no restrictions.
These settings can be found within:
- Each project's settings:
- From the Project's homepage, navigate to Settings > General.
- Fill in the Repository size limit (MB) field in the Naming, topics, avatar section.
- Click Save changes.
- Each group's settings:
- From the Group's homepage, navigate to Settings > General.
- Fill in the Repository size limit (MB) field in the Naming, visibility section.
- Click Save changes.
- GitLab's global settings:
- From the Dashboard, navigate to Admin Area > Settings > General.
- Expand the Account and limit section.
- Fill in the Size limit per repository (MB) field.
- Click Save changes.
The first push of a new project, including LFS objects, will be checked for size and will be rejected if the sum of their sizes exceeds the maximum allowed repository size.
NOTE: Note: The repository size limit includes repository files and LFS, but does not include artifacts, uploads, wiki, packages, or snippets.
For details on manually purging files, see reducing the repository size using Git.
NOTE: Note: For GitLab.com repository size limits, see accounts and limit settings.
If you are attaching a file to a comment or reply in GitLab and receive the 413 Request Entity Too Large
error, it is likely caused by having a max attachment size
larger than what the web server is configured to allow.
If you wanted to increase the max attachment size to 200m in a GitLab
Omnibus install, for example, you might need to
add the line below to /etc/gitlab/gitlab.rb
before increasing the max attachment size:
nginx['client_max_body_size'] = "200m"
Introduced in GitLab Ultimate 12.6.
Users can optionally specify an expiration date for personal access tokens. This expiration date is not a requirement, and can be set to any arbitrary date.
Since personal access tokens are the only token needed for programmatic access to GitLab, organizations with security requirements may want to enforce more protection to require regular rotation of these tokens.
Only a GitLab administrator can set a limit. Leaving it empty means there are no restrictions.
To set a limit on how long personal access tokens are valid:
- Navigate to Admin Area > Settings > General.
- Expand the Account and limit section.
- Fill in the Maximum allowable lifetime for personal access tokens (days) field.
- Click Save changes.
Once a lifetime for personal access tokens is set, GitLab will:
- Apply the lifetime for new personal access tokens, and require users to set an expiration date and a date no later than the allowed lifetime.
- After three hours, revoke old tokens with no expiration date or with a lifetime longer than the allowed lifetime. Three hours is given to allow administrators to change the allowed lifetime, or remove it, before revocation takes place.
- Introduced in GitLab Ultimate 13.1.
- It is deployed behind a feature flag, disabled by default.
- It is disabled on GitLab.com.
- It is not recommended for production use.
- To use it in GitLab self-managed instances, ask a GitLab administrator to enable it. (CORE ONLY)
GitLab administrators can choose to prevent personal access tokens from expiring automatically. The tokens will be usable after the expiry date, unless they are revoked explicitly.
To do this:
- Navigate to Admin Area > Settings > General.
- Expand the Account and limit section.
- Uncheck the Enforce personal access token expiration checkbox.
Optional Enforcement of Personal Access Token Expiry is deployed behind a feature flag and is disabled by default. GitLab administrators with access to the GitLab Rails console can enable it for your instance from the rails console.
To enable it:
Feature.enable(:enforce_pat_expiration)
To disable it:
Feature.disable(:enforce_pat_expiration)
Introduced in GitLab 12.7.
To maintain integrity of user details in Audit Events, GitLab administrators can choose to disable a user's ability to change their profile name.
To do this:
- Navigate to Admin Area > Settings > General, then expand Account and Limit.
- Check the Prevent users from changing their profile name checkbox.
NOTE: Note: When this ability is disabled, GitLab administrators will still be able to update the name of any user in their instance via the Admin UI or the API