Git abuse rate limit
DETAILS: Tier: Ultimate Offering: GitLab.com, Self-managed
- Introduced in GitLab 15.2 with a flag named
limit_unique_project_downloads_per_namespace_user
. Disabled by default.
FLAG:
On self-managed GitLab, by default this feature is not available. To make it available, an administrator can enable the feature flag named limit_unique_project_downloads_per_namespace_user
. On GitLab.com, this feature is available. On GitLab Dedicated, this feature is not available.
This is the group-level documentation. For self-managed instances, see the administration documentation.
Git abuse rate limiting is a feature to automatically ban users who download, clone, pull, fetch, or fork more than a specified number of repositories of a group in a given time frame. Banned users cannot access the top-level group or any of its non-public subgroups via HTTP or SSH. The rate limit also applies to users who authenticate with personal or group access tokens, as well as CI/CD job tokens. Access to unrelated groups is unaffected.
Git abuse rate limiting does not apply to top-level group owners, deploy tokens, or deploy keys.
How GitLab determines a user's rate limit is under development.
GitLab team members can view more information in this confidential epic:
https://gitlab.com/groups/gitlab-org/modelops/anti-abuse/-/epics/14
.
Automatic ban notifications
If the limit_unique_project_downloads_per_namespace_user
feature flag is enabled, selected users receive an email when a user is about to be banned.
If automatic banning is disabled, a user is not banned automatically when they exceed the limit. However, notifications are still sent. You can use this setup to determine the correct values of the rate limit settings before enabling automatic banning.
If automatic banning is enabled, an email notification is sent when a user is about to be banned, and the user is automatically banned from the group and its subgroups.
Configure Git abuse rate limiting
- On the left sidebar, select Settings > Reporting.
- Update the Git abuse rate limit settings:
- Enter a number in the Number of repositories field, greater than or equal to
0
and less than or equal to10,000
. This number specifies the maximum amount of unique repositories a user can download in the specified time period before they're banned. When set to0
, Git abuse rate limiting is disabled. - Enter a number in the Reporting time period (seconds) field, greater than or equal to
0
and less than or equal to86,400
(10 days). This number specifies the time in seconds a user can download the maximum amount of repositories before they're banned. When set to0
, Git abuse rate limiting is disabled. - Optional. Exclude up to
100
users by adding them to the Excluded users field. Excluded users are not automatically banned. - Add up to
100
users to the Send notifications to field. You must select at least one user. All users with the Owner role for the main group are selected by default. - Optional. Turn on the Automatically ban users from this namespace when they exceed the specified limits toggle to enable automatic banning.
- Enter a number in the Number of repositories field, greater than or equal to
- Select Save changes.