{{< details >}}
- Tier: 基础版, 专业版, 旗舰版
- Offering: 私有化部署
{{< /details >}}
使用此 API 来与您的极狐GitLab 实例的应用程序设置交互。
对您的应用程序设置的更改会受到缓存的影响,可能不会立即生效。默认情况下,极狐GitLab 会缓存应用程序设置 60 秒。有关如何控制实例的应用程序设置缓存的信息,请参见应用程序缓存间隔。
先决条件:
- 您必须对实例具有管理员访问权限。
获取当前应用程序设置的详细信息
{{< history >}}
-
always_perform_delayed_deletion
功能标志在极狐GitLab 15.11 中启用。 - 在极狐GitLab 16.0 中删除了
delayed_project_deletion
和delayed_group_deletion
属性。 - 在极狐GitLab 16.6 中删除了
in_product_marketing_emails_enabled
属性。 - 在极狐GitLab 16.6 中删除了
repository_storages
属性。 - 在极狐GitLab 16.7 中删除了
user_email_lookup_limit
属性。 - 在极狐GitLab 17.6 中添加了
allow_all_integrations
和allowed_integrations
属性。
{{< /history >}}
获取此极狐GitLab 实例的当前应用程序设置的详细信息。
GET /application/settings
curl --request GET \
--header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/application/settings"
示例响应:
{
"default_projects_limit" : 100000,
"signup_enabled" : true,
"id" : 1,
"default_branch_protection" : 2,
"default_branch_protection_defaults": {
"allowed_to_push": [
{
"access_level": 40
}
],
"allow_force_push": false,
"allowed_to_merge": [
{
"access_level": 40
}
]
},
"default_preferred_language" : "en",
"failed_login_attempts_unlock_period_in_minutes": 30,
"restricted_visibility_levels" : [],
"sign_in_restrictions": {},
"password_authentication_enabled_for_web" : true,
"after_sign_out_path" : null,
"max_attachment_size" : 10,
"max_decompressed_archive_size": 25600,
"max_export_size": 50,
"max_import_size": 50,
"max_import_remote_file_size": 10240,
"max_login_attempts": 3,
"user_oauth_applications" : true,
"updated_at" : "2016-01-04T15:44:55.176Z",
"session_expire_delay" : 10080,
"home_page_url" : null,
"default_snippet_visibility" : "private",
"outbound_local_requests_whitelist": [],
"domain_allowlist" : [],
"domain_denylist_enabled" : false,
"domain_denylist" : [],
"created_at" : "2016-01-04T15:44:55.176Z",
"default_ci_config_path" : null,
"default_project_visibility" : "private",
"default_group_visibility" : "private",
"gravatar_enabled" : true,
"container_expiration_policies_enable_historic_entries": true,
"container_registry_cleanup_tags_service_max_list_size": 200,
"container_registry_delete_tags_service_timeout": 250,
"container_registry_expiration_policies_caching": true,
"container_registry_expiration_policies_worker_capacity": 4,
"container_registry_token_expire_delay": 5,
"decompress_archive_file_timeout": 210,
"repository_storages_weighted": {"default": 100},
"plantuml_enabled": false,
"plantuml_url": null,
"diagramsnet_enabled": true,
"diagramsnet_url": "https://embed.diagrams.net",
"kroki_enabled": false,
"kroki_url": null,
"terminal_max_session_time": 0,
"polling_interval_multiplier": 1.0,
"rsa_key_restriction": 0,
"dsa_key_restriction": 0,
"ecdsa_key_restriction": 0,
"ed25519_key_restriction": 0,
"ecdsa_sk_key_restriction": 0,
"ed25519_sk_key_restriction": 0,
"first_day_of_week": 0,
"enforce_terms": true,
"terms": "Hello world!",
"performance_bar_allowed_group_id": 42,
"user_show_add_ssh_key_message": true,
"allow_account_deletion": true,
"updating_name_disabled_for_users": false,
"local_markdown_version": 0,
"allow_local_requests_from_hooks_and_services": true,
"allow_local_requests_from_web_hooks_and_services": true,
"allow_local_requests_from_system_hooks": false,
"asset_proxy_enabled": true,
"asset_proxy_url": "https://assets.example.com",
"asset_proxy_whitelist": ["example.com", "*.example.com", "your-instance.com"],
"asset_proxy_allowlist": ["example.com", "*.example.com", "your-instance.com"],
"maven_package_requests_forwarding": true,
"npm_package_requests_forwarding": true,
"pypi_package_requests_forwarding": true,
"snippet_size_limit": 52428800,
"issues_create_limit": 300,
"raw_blob_request_limit": 300,
"wiki_page_max_content_bytes": 52428800,
"require_admin_approval_after_user_signup": false,
"require_personal_access_token_expiry": true,
"personal_access_token_prefix": "glpat-",
"rate_limiting_response_text": null,
"keep_latest_artifact": true,
"admin_mode": false,
"floc_enabled": false,
"external_pipeline_validation_service_timeout": null,
"external_pipeline_validation_service_token": null,
"external_pipeline_validation_service_url": null,
"jira_connect_application_key": null,
"jira_connect_public_key_storage_enabled": false,
"jira_connect_proxy_url": null,
"jira_connect_additional_audience_url": null,
"silent_mode_enabled": false,
"package_registry_allow_anyone_to_pull_option": true,
"bulk_import_max_download_file_size": 5120,
"project_jobs_api_rate_limit": 600,
"security_txt_content": null,
"bulk_import_concurrent_pipeline_batch_limit": 25,
"concurrent_relation_batch_export_limit": 25,
"concurrent_github_import_jobs_limit": 1000,
"concurrent_bitbucket_import_jobs_limit": 100,
"concurrent_bitbucket_server_import_jobs_limit": 100,
"silent_admin_exports_enabled": false
}
在极狐GitLab专业版或旗舰版的用户还可能看到这些参数:
allow_all_integrations
allowed_integrations
group_owners_can_manage_default_branch_protection
file_template_project_id
geo_node_allowed_ips
geo_status_timeout
default_project_deletion_protection
deletion_adjourned_period
disable_personal_access_tokens
security_policy_global_group_approvers_enabled
security_approval_policies_limit
scan_execution_policies_action_limit
scan_execution_policies_schedule_limit
delete_unconfirmed_users
unconfirmed_users_delete_after_days
use_clickhouse_for_analytics
secret_push_protection_available
virtual_registries_endpoints_api_limit
{
"id": 1,
"signup_enabled": true,
"group_owners_can_manage_default_branch_protection": true,
"file_template_project_id": 1,
"geo_node_allowed_ips": "0.0.0.0/0, ::/0",
"default_project_deletion_protection": false,
"deletion_adjourned_period": 7,
"disable_personal_access_tokens": false,
"allow_all_integrations": true,
"allowed_integrations": [],
"virtual_registries_endpoints_api_limit": 1000,
...
}
更新应用程序设置
{{< history >}}
-
always_perform_delayed_deletion
功能标志在极狐GitLab 15.11 中启用。 - 在极狐GitLab 16.0 中删除了
delayed_project_deletion
和delayed_group_deletion
属性。 - 在极狐GitLab 16.7 中删除了
user_email_lookup_limit
属性。 - 在极狐GitLab 17.0 中弃用了
default_branch_protection
,请改用default_branch_protection_defaults
。 - 在极狐GitLab 17.6 中添加了
allow_all_integrations
和allowed_integrations
属性。
{{< /history >}}
更新此极狐GitLab 实例的当前应用程序设置。
PUT /application/settings
curl --request PUT \
--header "PRIVATE-TOKEN: <your_access_token>" \
--url "https://gitlab.example.com/api/v4/application/settings?signup_enabled=false&default_project_visibility=internal"
示例响应:
{
"id": 1,
"default_projects_limit": 100000,
"default_preferred_language": "en",
"failed_login_attempts_unlock_period_in_minutes": 30,
"signup_enabled": false,
"password_authentication_enabled_for_web": true,
"gravatar_enabled": true,
"created_at": "2015-06-12T15:51:55.432Z",
"updated_at": "2015-06-30T13:22:42.210Z",
"home_page_url": "",
"default_branch_protection": 2,
"default_branch_protection_defaults": {
"allowed_to_push": [
{
"access_level": 40
}
],
"allow_force_push": false,
"allowed_to_merge": [
{
"access_level": 40
}
]
},
"restricted_visibility_levels": [],
"sign_in_restrictions": {},
"max_attachment_size": 10,
"max_decompressed_archive_size": 25600,
"max_export_size": 50,
"max_import_size": 50,
"max_import_remote_file_size": 10240,
"max_login_attempts": 3,
"session_expire_delay": 10080,
"default_ci_config_path" : null,
"default_project_visibility": "internal",
"default_snippet_visibility": "private",
"default_group_visibility": "private",
"outbound_local_requests_whitelist": [],
"domain_allowlist": [],
"domain_denylist_enabled" : false,
"domain_denylist" : [],
"external_authorization_service_enabled": true,
"external_authorization_service_url": "https://authorize.me",
"external_authorization_service_default_label": "default",
"external_authorization_service_timeout": 0.5,
"user_oauth_applications": true,
"after_sign_out_path": "",
"container_expiration_policies_enable_historic_entries": true,
"container_registry_cleanup_tags_service_max_list_size": 200,
"container_registry_delete_tags_service_timeout": 250,
"container_registry_expiration_policies_caching": true,
"container_registry_expiration_policies_worker_capacity": 4,
"container_registry_token_expire_delay": 5,
"decompress_archive_file_timeout": 210,
"package_registry_cleanup_policies_worker_capacity": 2,
"plantuml_enabled": false,
"plantuml_url": null,
"diagramsnet_enabled": true,
"diagramsnet_url": "https://embed.diagrams.net",
"terminal_max_session_time": 0,
"polling_interval_multiplier": 1.0,
"rsa_key_restriction": 0,
"dsa_key_restriction": 0,
"ecdsa_key_restriction": 0,
"ed25519_key_restriction": 0,
"ecdsa_sk_key_restriction": 0,
"ed25519_sk_key_restriction": 0,
"first_day_of_week": 0,
"enforce_terms": true,
"terms": "Hello world!",
"performance_bar_allowed_group_id": 42,
"user_show_add_ssh_key_message": true,
"file_template_project_id": 1,
"local_markdown_version": 0,
"asset_proxy_enabled": true,
"asset_proxy_url": "https://assets.example.com",
"asset_proxy_allowlist": ["example.com", "*.example.com", "your-instance.com"],
"globally_allowed_ips": "",
"geo_node_allowed_ips": "0.0.0.0/0, ::/0",
"allow_local_requests_from_hooks_and_services": true,
"allow_local_requests_from_web_hooks_and_services": true,
"allow_local_requests_from_system_hooks": false,
"maven_package_requests_forwarding": true,
"npm_package_requests_forwarding": true,
"pypi_package_requests_forwarding": true,
"snippet_size_limit": 52428800,
"issues_create_limit": 300,
"raw_blob_request_limit": 300,
"wiki_page_max_content_bytes": 52428800,
"require_admin_approval_after_user_signup": false,
"require_personal_access_token_expiry": true,
"personal_access_token_prefix": "glpat-",
"rate_limiting_response_text": null,
"keep_latest_artifact": true,
"admin_mode": false,
"external_pipeline_validation_service_timeout": null,
"external_pipeline_validation_service_token": null,
"external_pipeline_validation_service_url": null,
"can_create_group": false,
"jira_connect_application_key": "123",
"jira_connect_public_key_storage_enabled": true,
"jira_connect_proxy_url": "http://gitlab.example.com",
"user_defaults_to_private_profile": true,
"projects_api_rate_limit_unauthenticated": 400,
"users_api_limit_followers": 100,
"users_api_limit_following": 100,
"users_api_limit_status": 240,
"users_api_limit_ssh_keys": 120,
"users_api_limit_ssh_key": 120,
"users_api_limit_gpg_keys": 120,
"users_api_limit_gpg_key": 120,
"silent_mode_enabled": false,
"security_policy_global_group_approvers_enabled": true,
"security_approval_policies_limit": 5,
"scan_execution_policies_action_limit": 10,
"scan_execution_policies_schedule_limit": 0,
"package_registry_allow_anyone_to_pull_option": true,
"bulk_import_max_download_file_size": 5120,
"project_jobs_api_rate_limit": 600,
"security_txt_content": null,
"bulk_import_concurrent_pipeline_batch_limit": 25,
"concurrent_relation_batch_export_limit": 25,
"downstream_pipeline_trigger_limit_per_project_user_sha": 0,
"concurrent_github_import_jobs_limit": 1000,
"concurrent_bitbucket_import_jobs_limit": 100,
"concurrent_bitbucket_server_import_jobs_limit": 100,
"silent_admin_exports_enabled": false
}
在极狐GitLab专业版或旗舰版的用户还可能看到这些参数:
allow_all_integrations
allowed_integrations
group_owners_can_manage_default_branch_protection
file_template_project_id
geo_node_allowed_ips
geo_status_timeout
default_project_deletion_protection
deletion_adjourned_period
disable_personal_access_tokens
security_policy_global_group_approvers_enabled
security_approval_policies_limit
scan_execution_policies_action_limit
scan_execution_policies_schedule_limit
delete_unconfirmed_users
unconfirmed_users_delete_after_days
use_clickhouse_for_analytics
virtual_registries_endpoints_api_limit
示例响应:
"file_template_project_id": 1,
"geo_node_allowed_ips": "0.0.0.0/0, ::/0",
"allow_all_integrations": true,
"allowed_integrations": [],
"virtual_registries_endpoints_api_limit": 1000
可用设置
{{< history >}}
-
housekeeping_full_repack_period
、housekeeping_gc_period
和housekeeping_incremental_repack_period
在极狐GitLab 15.8 中弃用。请改用housekeeping_optimize_repository_period
。 - 在极狐GitLab 16.1 中引入了
allow_account_deletion
。 - 在极狐GitLab 16.8 中引入了
allow_project_creation_for_guest_and_below
。 - 在极狐GitLab 17.0 中引入了
silent_admin_exports_enabled
。 - 在极狐GitLab 17.3 中引入了
require_personal_access_token_expiry
。 - 在极狐GitLab 17.4 中引入了
receptive_cluster_agents_enabled
。 - 在极狐GitLab 17.6 中添加了
allow_all_integrations
和allowed_integrations
。
{{< /history >}}
一般来说,所有设置都是可选的。启用某些设置时,您可能还需要配置其他相关设置。这些要求在下表的 Required
列中。
属性 | 类型 | 必需 | 描述 |
---|---|---|---|
admin_mode |
boolean | 否 | 要求管理员通过重新认证来启用管理员模式以进行管理任务。 |
admin_notification_email |
string | 否 | 已弃用:请改用 abuse_notification_email 。如果设置了,滥用报告将发送到此地址。滥用报告始终在管理员区域可用。 |
abuse_notification_email |
string | 否 | 如果设置了,滥用报告将发送到此地址。滥用报告始终在管理员区域可用。 |
notify_on_unknown_sign_in |
boolean | 否 | 启用从未知 IP 地址登录时发送通知。 |
after_sign_out_path |
string | 否 | 登出后重定向用户的位置。 |
email_restrictions_enabled |
boolean | 否 | 启用通过电子邮件进行注册的限制。 |
email_restrictions |
string | 由:email_restrictions_enabled 需要 |
在注册时检查与使用的电子邮件的正则表达式。 |
after_sign_up_text |
string | 否 | 用户注册后显示的文本。 |
akismet_api_key |
string | 由:akismet_enabled 需要 |
用于 Akismet 垃圾邮件保护的 API 密钥。 |
akismet_enabled |
boolean | 否 | (如果启用,则需要: akismet_api_key )启用或禁用 Akismet 垃圾邮件保护。 |
allow_all_integrations |
boolean | 否 | 当为 false 时,实例中只允许 allowed_integrations 中的集成。仅限专业版和旗舰版。 |
allowed_integrations |
array of strings | 否 | 当 allow_all_integrations 为 false 时,实例中只允许此列表中的集成。仅限专业版和旗舰版。 |
allow_account_deletion |
boolean | 否 | 设置为 true 以允许用户删除他们的帐户。仅限专业版和旗舰版。 |
allow_group_owners_to_manage_ldap |
boolean | 否 | 设置为 true 以允许群组所有者管理 LDAP。仅限专业版和旗舰版。 |
allow_local_requests_from_hooks_and_services |
boolean | 否 | (已弃用:请改用 allow_local_requests_from_web_hooks_and_services )允许从网络钩子和集成向本地网络发出请求。 |
allow_local_requests_from_system_hooks |
boolean | 否 | 允许从系统钩子向本地网络发出请求。 |
allow_local_requests_from_web_hooks_and_services |
boolean | 否 | 允许从网络钩子和集成向本地网络发出请求。 |
allow_project_creation_for_guest_and_below |
boolean | 否 | 指示分配到访客角色的用户是否可以创建群组和个人项目。默认值为 true 。 |
allow_runner_registration_token |
boolean | 否 | 允许使用注册令牌创建 runner。默认值为 true 。 |
archive_builds_in_human_readable |
string | 否 | 设置作业被视为旧的和过期的持续时间。超过此时间后,作业将被存档且无法重试。将其设为空以永不过期作业。必须不少于 1 天,例如:15 天 、1 个月 、2 年 。 |
asset_proxy_enabled |
boolean | 否 | (如果启用,则需要: asset_proxy_url )启用资产代理。需要重新启动极狐GitLab 以应用更改。 |
asset_proxy_secret_key |
string | 否 | 与资产代理服务器共享的秘密。需要重新启动极狐GitLab 以应用更改。 |
asset_proxy_url |
string | 否 | 资产代理服务器的 URL。需要重新启动极狐GitLab 以应用更改。 |
asset_proxy_whitelist |
string or array of strings | 否 | (已弃用:请改用 asset_proxy_allowlist )与这些域匹配的资产不会被代理。允许使用通配符。您的极狐GitLab 安装 URL 会自动列入允许列表。需要重新启动极狐GitLab 以应用更改。 |
asset_proxy_allowlist |
string or array of strings | 否 | 与这些域匹配的资产不会被代理。允许使用通配符。您的极狐GitLab 安装 URL 会自动列入允许列表。需要重新启动极狐GitLab 以应用更改。 |
authorized_keys_enabled |
boolean | 否 | 默认情况下,我们会写入 authorized_keys 文件以支持 Git 通过 SSH 进行身份验证而无需额外配置。极狐GitLab 可以优化以通过数据库文件验证 SSH 密钥。仅在您已配置 OpenSSH 服务器以使用 AuthorizedKeysCommand 时禁用此功能。 |
auto_devops_domain |
string | 否 | 为每个项目的自动评审应用和自动部署阶段指定默认使用的域。 |
auto_devops_enabled |
boolean | 否 | 默认启用项目的 Auto DevOps。它会根据预定义的 CI/CD 配置自动构建、测试和部署应用程序。 |
autocomplete_users |
integer | 否 | 每分钟对 GET /autocomplete/users 端点的最大身份验证请求数。 |
autocomplete_users_unauthenticated |
integer | 否 | 每分钟对 GET /autocomplete/users 端点的最大未经身份验证的请求数。 |
automatic_purchased_storage_allocation |
boolean | 否 | 启用此功能允许在命名空间中自动分配已购买的存储。仅适用于 EE 发行版。 |
bulk_import_enabled |
boolean | 否 | 启用通过直接传输迁移极狐GitLab 群组。在极狐GitLab 15.8 中引入。设置也在管理员区域可用。 |
bulk_import_max_download_file_size |
integer | 否 | 从源极狐GitLab 实例通过直接传输导入时的最大下载文件大小。在极狐GitLab 16.3 中引入。 |
can_create_group |
boolean | 否 | 指示用户是否可以创建顶级群组。在极狐GitLab 15.5 中引入。默认值为 true 。 |
check_namespace_plan |
boolean | 否 | 启用此功能后,只有在项目命名空间的计划中包含功能或项目为公开时,才可以使用已授权的 EE 功能。仅限专业版和旗舰版。 |
ci_job_live_trace_enabled |
boolean | 否 | 启用作业日志的增量日志记录。启用后,归档的作业日志会增量上传到对象存储。必须配置对象存储。您还可以在管理员区域中配置此设置。 |
ci_max_total_yaml_size_bytes |
integer | 否 | 可以为流水线配置分配的最大内存量(以字节为单位),包括所有包含的 YAML 配置文件。 |
ci_max_includes |
integer | 否 | 每条流水线的最大包含数。默认值为 150 。 |
concurrent_github_import_jobs_limit |
integer | 否 | GitHub 导入程序的最大并发导入作业数。默认值为 1000。在极狐GitLab 16.11 中引入。 |
concurrent_bitbucket_import_jobs_limit |
integer | 否 | Bitbucket Cloud 导入程序的最大并发导入作业数。默认值为 100。在极狐GitLab 16.11 中引入。 |
concurrent_bitbucket_server_import_jobs_limit |
integer | 否 | Bitbucket Server 导入程序的最大并发导入作业数。默认值为 100。在极狐GitLab 16.11 中引入。 |
commit_email_hostname |
string | 否 | 自定义主机名(用于私人提交电子邮件)。 |
container_expiration_policies_enable_historic_entries |
boolean | 否 | 启用所有项目的清理策略。 |
container_registry_cleanup_tags_service_max_list_size |
integer | 否 | 清理策略单次执行中可以删除的最大标签数。 |
container_registry_delete_tags_service_timeout |
integer | 否 | 清理过程删除清理策略标签批次所需的最大时间(以秒为单位)。 |
container_registry_expiration_policies_caching |
boolean | 否 | 在执行清理策略期间进行缓存。 |
container_registry_expiration_policies_worker_capacity |
integer | 否 | 清理策略工人的数量。 |
container_registry_token_expire_delay |
integer | 否 | 容器仓库令牌的持续时间(以分钟为单位)。 |
package_registry_cleanup_policies_worker_capacity |
integer | 否 | 分配给软件包清理策略的工人人数。 |
updating_name_disabled_for_users |
boolean | 否 | 禁用用户个人资料名称更改。 |
allow_account_deletion |
boolean | 否 | 启用用户删除其帐户。 |
deactivate_dormant_users |
boolean | 否 | 启用自动停用休眠用户。 |
deactivate_dormant_users_period |
integer | 否 | 用户被视为休眠的时间(以天为单位)。在极狐GitLab 15.3 中引入。 |
decompress_archive_file_timeout |
integer | 否 | 解压缩归档文件的默认超时时间(以秒为单位)。设置为 0 以禁用超时。在极狐GitLab 16.4 中引入。 |
default_artifacts_expire_in |
string | 否 | 设置每个作业产物的默认过期时间。 |
default_branch_name |
string | 否 | 为实例中的所有项目设置初始分支名称。 |
default_branch_protection |
integer | 否 | 在极狐GitLab 17.0 中弃用。请改用 default_branch_protection_defaults 。 |
default_branch_protection_defaults |
hash | 否 | 在极狐GitLab 17.0 中引入。有关可用选项,请参阅default_branch_protection_defaults 的选项。 |
default_ci_config_path |
string | 否 | 新项目的默认 CI/CD 配置文件和路径(如果未设置,则为 .gitlab-ci.yml )。 |
default_group_visibility |
string | 否 | 新群组的可见性级别。可以接受 private 、internal 和 public 作为参数。默认值为 private 。在极狐GitLab 16.4 中更改:不能设置为 restricted_visibility_levels 中的任何级别。 |
default_preferred_language |
string | 否 | 未登录用户的默认首选语言。 |
default_project_creation |
integer | 否 | 创建项目所需的默认最低角色。可以接受:0 (无), 1 (维护者), 2 (开发者), 3 (管理员) 或 4 (所有者)。 |
default_project_visibility |
string | 否 | 新项目的可见性级别。可以接受 private 、internal 和 public 作为参数。默认值为 private 。在极狐GitLab 16.4 中更改:不能设置为 restricted_visibility_levels 中的任何级别。 |
default_projects_limit |
integer | 否 | 每个用户的项目限制。默认值为 100000 。 |
default_snippet_visibility |
string | 否 | 新代码片段的可见性级别。可以接受 private 、internal 和 public 作为参数。默认值为 private 。 |
default_syntax_highlighting_theme |
integer | 否 | 新用户或未登录用户的默认语法高亮主题。 |
default_project_deletion_protection |
boolean | 否 | 启用默认项目删除保护,以便只有管理员可以删除项目。默认值为 false 。极狐GitLab私有化部署,专业版和旗舰版专用。 |
delete_unconfirmed_users |
boolean | 否 | 指定是否应删除未确认其电子邮件的用户。默认值为 false 。设置为 true 时,未确认的用户将在 unconfirmed_users_delete_after_days 天后删除。在极狐GitLab 16.1 中引入。极狐GitLab私有化部署,专业版和旗舰版专用。 |
deletion_adjourned_period |
integer | 否 | 在删除标记为删除的项目或群组之前等待的天数。值必须在 1 和 90 之间。默认值为 7 。极狐GitLab私有化部署,专业版和旗舰版专用。 |
diagramsnet_enabled |
boolean | 否 | (如果启用,则需要 diagramsnet_url )启用Diagrams.net 集成。默认值为 true 。 |
diagramsnet_url |
string | 由:diagramsnet_enabled 需要 |
集成的 Diagrams.net 实例 URL。 |
diff_max_patch_bytes |
integer | 否 | 最大差异补丁大小,以字节为单位。 |
diff_max_files |
integer | 否 | 最大差异文件数。 |
diff_max_lines |
integer | 否 | 最大差异行数。 |
disable_admin_oauth_scopes |
boolean | 否 | 阻止管理员将其极狐GitLab 帐户连接到具有 api 、read_api 、read_repository 、write_repository 、read_registry 、write_registry 或 sudo 作用域的非受信任 OAuth 2.0 应用程序。在极狐GitLab 15.6 中引入。 |
disable_feed_token |
boolean | 否 | 禁用 RSS/Atom 和日历提要令牌的显示。 |
disable_personal_access_tokens |
boolean | 否 | 禁用个人访问令牌。在极狐GitLab 15.7 中引入。极狐GitLab私有化部署,专业版和旗舰版专用。通过 API 禁用的个人访问令牌没有可用的方法启用。 |
disabled_oauth_sign_in_sources |
array of strings | 否 | 禁用的 OAuth 登录来源。 |
dns_rebinding_protection_enabled |
boolean | 否 | 强制执行 DNS 重绑定攻击保护。 |
domain_denylist_enabled |
boolean | 否 | (如果启用,则需要: domain_denylist )允许阻止来自特定域的电子邮件注册。 |
domain_denylist |
array of strings | 否 | 与这些域匹配的电子邮件地址的用户不能注册。允许使用通配符。在单独的行中输入多个条目。例如:domain.com ,*.domain.com 。 |
domain_allowlist |
array of strings | 否 | 强制人们只能使用公司电子邮件进行注册。默认值为 null ,表示没有限制。 |
downstream_pipeline_trigger_limit_per_project_user_sha |
integer | 否 |
最大下游流水线触发率。默认值:0 (无限制)。在极狐GitLab 16.10 中引入。 |
dsa_key_restriction |
integer | 否 | 上传的 DSA 密钥的最小允许位长度。默认值为 0 (无限制)。-1 禁用 DSA 密钥。 |
ecdsa_key_restriction |
integer | 否 | 上传的 ECDSA 密钥的最小允许曲线大小(以位为单位)。默认值为 0 (无限制)。-1 禁用 ECDSA 密钥。 |
ecdsa_sk_key_restriction |
integer | 否 | 上传的 ECDSA_SK 密钥的最小允许曲线大小(以位为单位)。默认值为 0 (无限制)。-1 禁用 ECDSA_SK 密钥。 |
ed25519_key_restriction |
integer | 否 | 上传的 ED25519 密钥的最小允许曲线大小(以位为单位)。默认值为 0 (无限制)。-1 禁用 ED25519 密钥。 |
ed25519_sk_key_restriction |
integer | 否 | 上传的 ED25519_SK 密钥的最小允许曲线大小(以位为单位)。默认值为 0 (无限制)。-1 禁用 ED25519_SK 密钥。 |
eks_access_key_id |
string | 否 | AWS IAM 访问密钥 ID。 |
eks_account_id |
string | 否 | 亚马逊账户 ID。 |
eks_integration_enabled |
boolean | 否 | 启用与 Amazon EKS 的集成。 |
eks_secret_access_key |
string | 否 | AWS IAM 秘密访问密钥。 |
elasticsearch_aws_access_key |
string | 否 | AWS IAM 访问密钥。仅限专业版和旗舰版。 |
elasticsearch_aws_region |
string | 否 | Elasticsearch 域配置的 AWS 区域。仅限专业版和旗舰版。 |
elasticsearch_aws_secret_access_key |
string | 否 | AWS IAM 秘密访问密钥。仅限专业版和旗舰版。 |
elasticsearch_aws |
boolean | 否 | 启用使用 AWS 托管的 Elasticsearch。仅限专业版和旗舰版。 |
elasticsearch_indexed_field_length_limit |
integer | 否 | Elasticsearch 索引的文本字段的最大大小。0 值表示没有限制。这不适用于存储库和 Wiki 索引。仅限专业版和旗舰版。 |
elasticsearch_indexed_file_size_limit_kb |
integer | 否 | Elasticsearch 索引的存储库和 Wiki 文件的最大大小。仅限专业版和旗舰版。 |
elasticsearch_indexing |
boolean | 否 | 启用 Elasticsearch 索引。仅限专业版和旗舰版。 |
elasticsearch_requeue_workers |
boolean | 否 | 启用索引工作者的自动重新排队。这通过排队 Sidekiq 作业直到所有文档处理完毕来提高非代码索引吞吐量。仅限专业版和旗舰版。 |
elasticsearch_limit_indexing |
boolean | 否 | 限制 Elasticsearch 仅索引特定命名空间和项目。仅限专业版和旗舰版。 |
elasticsearch_max_bulk_concurrency |
integer | 否 | 每次索引操作的 Elasticsearch 批量请求的最大并发性。这仅适用于存储库索引操作。仅限专业版和旗舰版。 |
elasticsearch_max_code_indexing_concurrency |
integer | 否 | Elasticsearch 代码索引后台作业的最大并发性。这仅适用于存储库索引操作。仅限专业版和旗舰版。 |
elasticsearch_worker_number_of_shards |
integer | 否 | 索引工作者分片的数量。这通过排队更多并行的 Sidekiq 作业来提高非代码索引吞吐量。默认值为 2 。仅限专业版和旗舰版。 |
elasticsearch_max_bulk_size_mb |
integer | 否 | Elasticsearch 批量索引请求的最大大小(以 MB 为单位)。这仅适用于存储库索引操作。仅限专业版和旗舰版。 |
elasticsearch_namespace_ids |
array of integers | 否 | 如果启用了 elasticsearch_limit_indexing ,则通过 Elasticsearch 索引的命名空间。仅限专业版和旗舰版。 |
elasticsearch_search |
boolean | no | 启用 Elasticsearch 搜索。仅专业版和旗舰版可用。 |
elasticsearch_url |
string | no | 用于连接 Elasticsearch 的 URL。使用逗号分隔的列表以支持集群(例如,http://localhost:9200, http://localhost:9201" )。仅专业版和旗舰版可用。 |
elasticsearch_username |
string | no | 你的 Elasticsearch 实例的 用户名 。仅专业版和旗舰版可用。 |
elasticsearch_password |
string | no | 你的 Elasticsearch 实例的密码。仅专业版和旗舰版可用。 |
elasticsearch_retry_on_failure |
integer | no | Elasticsearch 搜索请求的最大重试次数。仅专业版和旗舰版可用。 |
email_additional_text |
string | no | 出于法律/审计/合规原因,附加文本将添加到每封电子邮件的底部。仅专业版和旗舰版可用。 |
email_author_in_body |
boolean | no | 某些电子邮件服务器不支持覆盖电子邮件发件人名称。启用此选项以在电子邮件正文中包含议题、合并请求或评论的作者姓名。 |
email_confirmation_setting |
string | no | 指定用户在登录前是否必须确认其电子邮件。可能的值为 off 、soft 和 hard 。 |
custom_http_clone_url_root |
string | no | 设置 HTTP(S) 的自定义 Git 克隆 URL。 |
enabled_git_access_protocol |
string | no | 启用的 Git 访问协议。允许的值为:ssh 、http 和 all (允许两者)。all 值在极狐 GitLab 16.9 中引入。 |
enforce_namespace_storage_limit |
boolean | no | 启用此选项以强制执行命名空间存储限制。 |
enforce_terms |
boolean | no | (如果启用,要求: terms ) 强制所有用户遵守应用程序的服务条款。 |
external_auth_client_cert |
string | no | (如果启用,要求: external_auth_client_key ) 用于与外部授权服务进行身份验证的证书。 |
external_auth_client_key_pass |
string | no | 用于使用外部服务进行身份验证时的私钥密码。这在存储时被加密。 |
external_auth_client_key |
string | required by: external_auth_client_cert
|
当需要外部授权服务的身份验证时,用于证书的私钥。这在存储时被加密。 |
external_authorization_service_default_label |
string | required by:external_authorization_service_enabled
|
在请求授权时使用的默认分类标签,当项目上未指定分类标签时使用。 |
external_authorization_service_enabled |
boolean | no | (如果启用,要求: external_authorization_service_default_label 、external_authorization_service_timeout 和 external_authorization_service_url ) 启用使用外部授权服务访问项目。 |
external_authorization_service_timeout |
float | required by:external_authorization_service_enabled
|
授权请求中止的超时时间,以秒为单位。当请求超时时,用户的访问权限被拒绝。(最小值:0.001,最大值:10,步长:0.001)。 |
external_authorization_service_url |
string | required by:external_authorization_service_enabled
|
授权请求指向的 URL。 |
external_pipeline_validation_service_url |
string | no | 用于流水线验证请求的 URL。 |
external_pipeline_validation_service_token |
string | no | 可选。包含在对 external_pipeline_validation_service_url 中的 URL 的请求中的 X-Gitlab-Token 头中的令牌。 |
external_pipeline_validation_service_timeout |
integer | no | 等待流水线验证服务响应的时间。如果超时,则假定为 OK 。 |
static_objects_external_storage_url |
string | no | 存储库静态对象的外部存储 URL。 |
static_objects_external_storage_auth_token |
string | required by: static_objects_external_storage_url
|
链接在 static_objects_external_storage_url 中的外部存储的身份验证令牌。 |
failed_login_attempts_unlock_period_in_minutes |
integer | no | 当达到最大登录失败次数时,解锁用户所需的时间(以分钟为单位)。 |
file_template_project_id |
integer | no | 从项目中加载自定义文件模板的项目 ID。仅专业版和旗舰版可用。 |
first_day_of_week |
integer | no | 日历视图和日期选择器的周起始日。有效值为 0 (默认)表示星期日,1 表示星期一,6 表示星期六。 |
globally_allowed_ips |
string | no | 始终允许入站流量的 IP 地址和 CIDR 的逗号分隔列表。例如,1.1.1.1, 2.2.2.0/24 。 |
geo_node_allowed_ips |
string | yes | 允许的次级节点的 IP 和 CIDR 的逗号分隔列表。例如,1.1.1.1, 2.2.2.0/24 。仅极狐GitLab私有化部署、专业版和旗舰版可用。 |
geo_status_timeout |
integer | no | 获取次级节点状态的请求超时的秒数。仅极狐GitLab私有化部署、专业版和旗舰版可用。 |
git_two_factor_session_expiry |
integer | no | 启用 2FA 时 Git 操作会话的最长持续时间(以分钟为单位)。仅专业版和旗舰版可用。 |
gitaly_timeout_default |
integer | no | 默认的 Gitaly 超时,以秒为单位。此超时不适用于 Git fetch/push 操作或 Sidekiq 作业。设置为 0 以禁用超时。 |
gitaly_timeout_fast |
integer | no | Gitaly 快速操作超时,以秒为单位。某些 Gitaly 操作预计是快速的。如果它们超过此阈值,可能是存储分片出现问题,“快速失败”可以帮助保持极狐GitLab 实例的稳定性。设置为 0 以禁用超时。 |
gitaly_timeout_medium |
integer | no | 中等 Gitaly 超时,以秒为单位。此值应介于快速和默认超时之间。设置为 0 以禁用超时。 |
gitlab_dedicated_instance |
boolean | no | 表明该实例是否为极狐GitLab 专用。 |
gitlab_environment_toolkit_instance |
boolean | no | 表明该实例是否为极狐GitLab 服务 Ping 报告配置了环境工具包。 |
gitlab_shell_operation_limit |
integer | no | 用户每分钟可以执行的 Git 操作的最大数量。默认值:600 。在极狐GitLab 16.2 中引入。 |
grafana_enabled |
boolean | no | 启用 Grafana。 |
grafana_url |
string | no | Grafana URL。 |
gravatar_enabled |
boolean | no | 启用 Gravatar。 |
group_owners_can_manage_default_branch_protection |
boolean | no | 防止覆盖默认分支保护。仅极狐GitLab私有化部署、专业版和旗舰版可用。 |
hashed_storage_enabled |
boolean | no | 使用哈希存储路径创建新项目:启用基于哈希的不可变路径和存储库名称以在磁盘上存储存储库。这可以防止项目 URL 更改时需要移动或重命名存储库,并可能提高磁盘 I/O 性能。(在极狐GitLab 版本 13.0 及更高版本中始终启用,配置计划在 14.0 中删除) |
help_page_hide_commercial_content |
boolean | no | 隐藏帮助中的营销相关条目。 |
help_page_support_url |
string | no | 帮助页面和帮助下拉列表的备用支持 URL。 |
help_page_text |
string | no | 显示在帮助页面上的自定义文本。 |
hide_third_party_offers |
boolean | no | 不在极狐GitLab 中显示来自第三方的报价。 |
home_page_url |
string | no | 未登录时重定向到此 URL。 |
housekeeping_bitmaps_enabled |
boolean | no | 已弃用。Git packfile 位图创建始终启用,无法通过 API 和 UI 更改。始终返回 true 。 |
housekeeping_enabled |
boolean | no | 启用或禁用 Git 清理。需要设置其他字段。有关更多信息,请参见清理设置。 |
housekeeping_full_repack_period |
integer | no | 已弃用。经过多少次 Git 推送后运行增量 git repack 。请改用 housekeeping_optimize_repository_period 。有关更多信息,请参见清理设置。 |
housekeeping_gc_period |
integer | no | 已弃用。经过多少次 Git 推送后运行 git gc 。请改用 housekeeping_optimize_repository_period 。有关更多信息,请参见清理设置。 |
housekeeping_incremental_repack_period |
integer | no | 已弃用。经过多少次 Git 推送后运行增量 git repack 。请改用 housekeeping_optimize_repository_period 。有关更多信息,请参见清理设置。 |
housekeeping_optimize_repository_period |
integer | no | 经过多少次 Git 推送后运行增量 git repack 。 |
html_emails_enabled |
boolean | no | 启用 HTML 电子邮件。 |
import_sources |
array of strings | no | 允许项目导入的来源,可能的值为:github 、bitbucket 、bitbucket_server 、fogbugz 、git 、gitlab_project 、gitea 和 manifest 。 |
invisible_captcha_enabled |
boolean | no | 启用注册时的不可见 CAPTCHA 垃圾检测。默认情况下禁用。 |
issues_create_limit |
integer | no | 每分钟每用户的议题创建请求的最大数量。默认情况下禁用。 |
jira_connect_application_key |
string | no | 用于与极狐GitLab for Jira Cloud 应用程序进行身份验证的 OAuth 应用程序的 ID。 |
jira_connect_public_key_storage_enabled |
boolean | no | 启用极狐GitLab for Jira Cloud 应用程序的公钥存储。 |
jira_connect_proxy_url |
string | no | 作为极狐GitLab for Jira Cloud 应用程序的代理使用的极狐GitLab 实例的 URL。 |
keep_latest_artifact |
boolean | no | 防止删除最近成功作业的产物,无论到期时间如何。默认情况下启用。 |
local_markdown_version |
integer | no | 当任何缓存的 Markdown 应该失效时增加此值。 |
mailgun_signing_key |
string | no | 用于接收事件的 Mailgun HTTP webhook 签名密钥。 |
mailgun_events_enabled |
boolean | no | 启用 Mailgun 事件接收器。 |
maintenance_mode_message |
string | no | 当实例处于维护模式时显示的消息。仅专业版和旗舰版可用。 |
maintenance_mode |
boolean | no | 当实例处于维护模式时,非管理员用户可以登录并拥有只读访问权限,并进行只读 API 请求。仅专业版和旗舰版可用。 |
max_artifacts_size |
integer | no | 最大产物大小,以 MB 为单位。 |
max_attachment_size |
integer | no | 附件大小限制,以 MB 为单位。 |
max_decompressed_archive_size |
integer | no | 导入档案的最大解压文件大小,以 MB 为单位。设置为 0 表示无限制。默认值为 25600 。 |
max_export_size |
integer | no | 最大导出大小,以 MB 为单位。0 表示无限制。默认值为 0 (无限制)。 |
max_import_size |
integer | no | 最大导入大小,以 MB 为单位。0 表示无限制。默认值为 0 (无限制)。 |
max_import_remote_file_size |
integer | no | 从外部对象存储导入的最大远程文件大小。在极狐GitLab 16.3 中引入。 |
max_login_attempts |
integer | no | 锁定用户之前的最大登录尝试次数。 |
max_pages_size |
integer | no | 页面存储库的最大大小,以 MB 为单位。 |
max_personal_access_token_lifetime |
integer | no | 访问令牌的最大允许有效期,以天为单位。如果留空,则应用默认值 365。当设置时,值必须为 365 或更少。当更改时,现有的访问令牌如果其过期日期超出最大允许有效期,将被撤销。仅极狐GitLab私有化部署、旗舰版可用。在极狐GitLab 17.6 或更高版本中,可以通过启用名为 buffered_token_expiration_limit 的功能标志来将最大有效期限制扩展到 400 天。 |
max_ssh_key_lifetime |
integer | no | SSH 密钥的最大允许有效期,以天为单位。仅极狐GitLab私有化部署、旗舰版可用。在极狐GitLab 17.6 或更高版本中,可以通过启用名为 buffered_token_expiration_limit 的功能标志来将最大有效期限制扩展到 400 天。 |
max_terraform_state_size_bytes |
integer | no | Terraform 状态 文件的最大大小,以字节为单位。将此设置为 0 表示无限制的文件大小。 |
metrics_method_call_threshold |
integer | no | 方法调用仅在其耗时超过给定的毫秒数时才被跟踪。 |
max_number_of_repository_downloads |
integer | no | 用户在指定时间段内可以下载的唯一存储库的最大数量,超过后将被禁止。默认值:0,最大值:10,000 个存储库。在极狐GitLab 15.1 中引入。仅极狐GitLab私有化部署、旗舰版可用。 |
max_number_of_repository_downloads_within_time_period |
integer | no | 报告时间段(以秒为单位)。默认值:0,最大值:864,000 秒(10 天)。在极狐GitLab 15.1 中引入。仅极狐GitLab私有化部署、旗舰版可用。 |
max_yaml_depth |
integer | no | 使用 include 关键字 添加的 CI/CD 配置的最大嵌套深度。默认值:100 。 |
max_yaml_size_bytes |
integer | no | 单个 CI/CD 配置文件的最大大小,以字节为单位。默认值:2097152 。 |
git_rate_limit_users_allowlist |
array of strings | no | 从 Git 防滥用速率限制中排除的用户名列表。默认值:[] ,最大值:100 个用户名。在极狐GitLab 15.2 中引入。仅极狐GitLab私有化部署、旗舰版可用。 |
git_rate_limit_users_alertlist |
array of integers | no | 当 Git 滥用速率限制超出时接收电子邮件的用户 ID 列表。默认值:[] ,最大值:100 个用户 ID。在极狐GitLab 15.9 中引入。仅极狐GitLab私有化部署、旗舰版可用。 |
auto_ban_user_on_excessive_projects_download |
boolean | no | 启用时,当用户下载的唯一项目数量超过 max_number_of_repository_downloads 和 max_number_of_repository_downloads_within_time_period 指定的时间段内的最大数量时,他们会自动被禁止访问应用程序。在极狐GitLab 15.4 中引入。仅极狐GitLab私有化部署、旗舰版可用。 |
mirror_available |
boolean | no | 允许项目维护者配置存储库镜像。如果禁用,则只有管理员可以配置存储库镜像。 |
mirror_capacity_threshold |
integer | no | 在预先调度更多镜像之前,最小可用容量。仅专业版和旗舰版可用。 |
mirror_max_capacity |
integer | no | 同时可以同步的最大镜像数量。仅专业版和旗舰版可用。 |
mirror_max_delay |
integer | no | 调度同步时镜像更新之间的最大时间(以分钟为单位)。仅专业版和旗舰版可用。 |
maven_package_requests_forwarding |
boolean | no | 当 GitLab 软件包仓库中找不到软件包时,将 repo.maven.apache.org 用作默认远程存储库。仅专业版和旗舰版可用。 |
npm_package_requests_forwarding |
boolean | no | 当 GitLab 软件包仓库中找不到软件包时,将 npmjs.org 用作默认远程存储库。仅专业版和旗舰版可用。 |
pypi_package_requests_forwarding |
boolean | no | 当 GitLab 软件包仓库中找不到软件包时,将 pypi.org 用作默认远程存储库。仅专业版和旗舰版可用。 |
outbound_local_requests_whitelist |
array of strings | no | 定义一个受信任域或 IP 地址列表,当为 Webhooks 和集成禁用本地请求时,允许向其发送本地请求。 |
package_registry_allow_anyone_to_pull_option |
boolean | no | 启用以允许任何人从软件包仓库中拉取,可见且可更改。 |
package_metadata_purl_types |
array of integers | no | 要同步的软件包仓库元数据列表。请参阅可用值列表。仅极狐GitLab私有化部署、旗舰版可用。 |
pages_domain_verification_enabled |
boolean | no | 要求用户证明自定义域的所有权。域验证是公共极狐GitLab 站点的重要安全措施。要求用户证明他们控制一个域,然后才能启用该域。 |
password_authentication_enabled_for_git |
boolean | no | 启用通过极狐GitLab 帐户密码进行 HTTP(S) 上的 Git 身份验证。默认值为 true 。 |
password_authentication_enabled_for_web |
boolean | no | 启用通过极狐GitLab 帐户密码进行 Web 界面的身份验证。默认值为 true 。 |
minimum_password_length |
integer | no | 表示密码是否需要最小长度。在极狐GitLab 15.1 中引入。仅专业版和旗舰版可用。 |
password_number_required |
boolean | no | 表示密码是否至少需要一个数字。在极狐GitLab 15.1 中引入。仅专业版和旗舰版可用。 |
password_symbol_required |
boolean | no | 表示密码是否至少需要一个符号字符。在极狐GitLab 15.1 中引入。仅专业版和旗舰版可用。 |
password_uppercase_required |
boolean | no | 表示密码是否至少需要一个大写字母。在极狐GitLab 15.1 中引入。仅专业版和旗舰版可用。 |
password_lowercase_required |
boolean | no | 表示密码是否至少需要一个小写字母。在极狐GitLab 15.1 中引入。仅专业版和旗舰版可用。 |
performance_bar_allowed_group_id |
string | no | (已弃用:请改用 performance_bar_allowed_group_path )允许切换性能栏的群组路径。 |
performance_bar_allowed_group_path |
string | no | 允许切换性能栏的群组路径。 |
performance_bar_enabled |
boolean | no | (已弃用:传递 performance_bar_allowed_group_path: nil )允许启用性能栏。 |
personal_access_token_prefix |
string | no | 为所有生成的个人访问令牌设置前缀。 |
pipeline_limit_per_project_user_sha |
integer | no | 每分钟每用户和提交的流水线创建请求的最大数量。默认情况下禁用。 |
gitpod_enabled |
boolean | no | (如果启用,要求: gitpod_url ) 启用 Gitpod 集成。默认值为 false 。 |
gitpod_url |
string | required by: gitpod_enabled
|
Gitpod 集成的实例 URL。 |
kroki_enabled |
boolean | no | (如果启用,要求: kroki_url ) 启用 Kroki 集成。默认值为 false 。 |
kroki_url |
string | required by: kroki_enabled
|
Kroki 集成的实例 URL。 |
kroki_formats |
object | no | Kroki 实例支持的附加格式。可能的值为 true 或 false ,适用于格式 bpmn 、blockdiag 和 excalidraw ,格式为 <format>: true 或 <format>: false 。 |
plantuml_enabled |
boolean | no | (如果启用,要求: plantuml_url ) 启用 PlantUML 集成。默认值为 false 。 |
plantuml_url |
string | required by: plantuml_enabled
|
PlantUML 集成的实例 URL。 |
polling_interval_multiplier |
float | no | 用于执行轮询的端点的间隔倍数。设置为 0 以禁用轮询。 |
project_export_enabled |
boolean | no | 启用项目导出。 |
project_jobs_api_rate_limit |
integer | no | 对 /project/:id/jobs 每分钟的最大认证请求数。在极狐GitLab 16.5 中引入。默认值:600。 |
projects_api_rate_limit_unauthenticated |
integer | no | 在极狐GitLab 15.10 中引入。未认证请求到列出所有项目 API的每 10 分钟每 IP 地址的最大请求数。默认值:400。要禁用限速,设置为 0。 |
users_api_limit_following |
integer | no | 每分钟每用户或 IP 地址的最大请求数。默认值:100。设置为 0 以禁用限制。在极狐GitLab 17.10 中引入。 |
users_api_limit_followers |
integer | no | 每分钟每用户或 IP 地址的最大请求数。默认值:100。设置为 0 以禁用限制。在极狐GitLab 17.10 中引入。 |
users_api_limit_status |
integer | no | 每分钟每用户或 IP 地址的最大请求数。默认值:240。设置为 0 以禁用限制。在极狐GitLab 17.10 中引入。 |
users_api_limit_keys |
integer | no | 每分钟每用户或 IP 地址的最大请求数。默认值:120。设置为 0 以禁用限制。在极狐GitLab 17.10 中引入。 |
users_api_limit_key |
integer | no | 每分钟每用户或 IP 地址的最大请求数。默认值:120。设置为 0 以禁用限制。在极狐GitLab 17.10 中引入。 |
users_api_limit_gpg_keys |
integer | no | 每分钟每用户或 IP 地址的最大请求数。默认值:120。设置为 0 以禁用限制。在极狐GitLab 17.10 中引入。 |
users_api_limit_gpg_key |
integer | no | 每分钟每用户或 IP 地址的最大请求数。默认值:120。设置为 0 以禁用限制。在极狐GitLab 17.10 中引入。 |
virtual_registries_endpoints_api_limit |
integer | no | 虚拟仓库端点的最大请求数,每个 IP 地址,每 15 秒。默认值:1000。设置为 0 以禁用限制。在极狐GitLab 17.11 中引入。 |
prometheus_metrics_enabled |
boolean | no | 启用 Prometheus 指标。 |
protected_ci_variables |
boolean | no | CI/CD 变量默认受保护。 |
disable_overriding_approvers_per_merge_request |
boolean | no | 防止在项目和合并请求中编辑审批规则。 |
prevent_merge_requests_author_approval |
boolean | no | 防止作者批准合并请求。 |
prevent_merge_requests_committers_approval |
boolean | no | 防止合并请求的提交者批准。 |
push_event_activities_limit |
integer | no | 单次推送中更改(分支或标签)的最大数量,超过后会创建批量推送事件。设置为 0 不禁用限速。 |
push_event_hooks_limit |
integer | no | 单次推送中更改(分支或标签)的最大数量,超过后不会触发 Webhooks 和集成。设置为 0 不禁用限速。 |
rate_limiting_response_text |
string | no | 当通过 throttle_* 设置启用限速时,发送此纯文本响应,当超过限速时。默认情况下,发送“稍后重试” 。 |
raw_blob_request_limit |
integer | no | 每个原始路径每分钟的最大请求数(默认值为 300 )。设置为 0 以禁用限速。 |
search_rate_limit |
integer | no | 进行身份验证时每分钟执行搜索的最大请求数。默认值:30。要禁用限速,设置为 0。 |
search_rate_limit_unauthenticated |
integer | no | 未经身份验证时每分钟执行搜索的最大请求数。默认值:10。要禁用限速,设置为 0。 |
recaptcha_enabled |
boolean | no | (如果启用,要求: recaptcha_private_key 和 recaptcha_site_key ) 启用 reCAPTCHA。 |
login_recaptcha_protection_enabled |
boolean | no | 启用 reCAPTCHA 登录保护。 |
recaptcha_private_key |
string | required by: recaptcha_enabled
|
reCAPTCHA 的私钥。 |
recaptcha_site_key |
string | required by: recaptcha_enabled
|
reCAPTCHA 的站点密钥。 |
receptive_cluster_agents_enabled |
boolean | no | 为 Kubernetes 的极狐GitLab 代理启用接收模式。 |
receive_max_input_size |
integer | no | 最大推送大小(MB)。 |
remember_me_enabled |
boolean | no | 启用记住我设置。在极狐GitLab 16.0 中引入。 |
repository_checks_enabled |
boolean | no | 极狐GitLab 会定期在所有项目和 wiki 存储库中运行 git fsck 以查找静默磁盘损坏问题。 |
repository_size_limit |
integer | no | 每个存储库的大小限制(MB)。仅专业版和旗舰版可用。 |
repository_storages_weighted |
hash of strings to integers | no | 从 gitlab.yml 中获取的名称的哈希值到权重。新项目在这些存储之一中创建,通过加权随机选择。 |
require_admin_approval_after_user_signup |
boolean | no | 启用后,通过仓库单注册帐户的任何用户将处于待批准状态,必须由管理员明确批准。 |
require_personal_access_token_expiry |
boolean | no | 启用后,用户在创建群组或项目访问令牌时,或由非服务帐户拥有的个人访问令牌时,必须设置过期日期。 |
require_two_factor_authentication |
boolean | no | (如果启用,要求: two_factor_grace_period ) 要求所有用户设置双因素身份验证。 |
resource_usage_limits |
hash | no | 在 Sidekiq 工作人员中强制执行的资源使用限制定义。此设置仅适用于 JihuLab.com。 |
restricted_visibility_levels |
array of strings | no | 非管理员用户不能用于群组、项目或片段的选定级别。可以接受 private 、internal 和 public 作为参数。默认值为 null ,表示没有限制。在极狐GitLab 16.4 中发生变更:不能选择设置为 default_project_visibility 和 default_group_visibility 的级别。 |
rsa_key_restriction |
integer | no | 上传的 RSA 密钥的最低允许位长度。默认值为 0 (无限制)。-1 禁用 RSA 密钥。 |
session_expire_delay |
integer | no | 会话持续时间,以分钟为单位。需要重新启动极狐GitLab 以应用更改。 |
session_expire_from_init |
boolean | no | 如果为 true ,则会话将在创建会话后而不是在最后一次活动后到期。会话的生存期由 session_expire_delay 定义。 |
security_policy_global_group_approvers_enabled |
boolean | no | 是否在项目层次结构中或全局查找合并请求审批策略审批群组。 |
security_approval_policies_limit |
integer | no | 每个安全策略项目的最大活动合并请求审批策略数量。默认值:5。最大值:20。 |
scan_execution_policies_action_limit |
integer | no | 每个扫描执行策略的 actions 的最大数量。从极狐GitLab 18.0 开始默认值:10。最大值:20。 |
scan_execution_policies_schedule_limit |
integer | no | 每个扫描执行策略的 type: schedule 规则的最大数量。默认值:0。最大值:20。 |
security_txt_content |
string | no | 公共安全联系人信息。在极狐GitLab 16.7 中引入。 |
service_access_tokens_expiration_enforced |
boolean | no | 标志表示服务帐户用户的令牌到期日期是否为可选。 |
shared_runners_enabled |
boolean | no | (如果启用,要求: shared_runners_text 和 shared_runners_minutes ) 为新项目启用实例 runner。 |
shared_runners_minutes |
integer | required by: shared_runners_enabled
|
设置群组每月可以在实例 runner 上使用的最大计算分钟数。仅专业版和旗舰版可用。 |
shared_runners_text |
string | required by: shared_runners_enabled
|
实例 runner 文本。 |
runner_token_expiration_interval |
integer | no | 设置新注册的实例 runner 的身份验证令牌的到期时间(以秒为单位)。最小值为 7200 秒。有关更多信息,请参阅自动旋转身份验证令牌。 |
group_runner_token_expiration_interval |
integer | no | 设置新注册的群组 runner 的身份验证令牌的到期时间(以秒为单位)。最小值为 7200 秒。有关更多信息,请参阅自动旋转身份验证令牌。 |
project_runner_token_expiration_interval |
integer | no | 设置新注册的项目 runner 的身份验证令牌的到期时间(以秒为单位)。最小值为 7200 秒。有关更多信息,请参阅自动旋转身份验证令牌。 |
sidekiq_job_limiter_mode |
string | no |
track 或 compress 。设置Sidekiq 作业大小限制的行为。默认值:’compress’。 |
sidekiq_job_limiter_compression_threshold_bytes |
integer | no | 在存储到 Redis 之前 Sidekiq 作业被压缩的字节阈值。默认值:100,000 字节(100 KB)。 |
sidekiq_job_limiter_limit_bytes |
integer | no | Sidekiq 作业被拒绝的字节阈值。默认值:0 字节(不拒绝任何作业)。 |
signin_enabled |
string | no | (已弃用:请改用 password_authentication_enabled_for_web )表示是否为 Web 界面启用密码身份验证的标志。 |
sign_in_restrictions |
hash | no | 应用程序登录限制。 |
signup_enabled |
boolean | no | 启用注册。默认值为 true 。 |
silent_admin_exports_enabled |
boolean | no | 启用静默管理员导出。默认值为 false 。 |
silent_mode_enabled |
boolean | no | 启用静默模式。默认值为 false 。 |
slack_app_enabled |
boolean | no | (如果启用,要求: slack_app_id 、slack_app_secret 、slack_app_signing_secret 和 slack_app_verification_token ) 启用极狐GitLab for Slack 应用程序。 |
slack_app_id |
string | required by: slack_app_enabled
|
极狐GitLab for Slack 应用程序的客户端 ID。 |
slack_app_secret |
string | required by: slack_app_enabled
|
极狐GitLab for Slack 应用程序的客户端密钥。用于对应用程序的 OAuth 请求进行身份验证。 |
slack_app_signing_secret |
string | required by: slack_app_enabled
|
极狐GitLab for Slack 应用程序的签名密钥。用于对应用程序的 API 请求进行身份验证。 |
slack_app_verification_token |
string | required by: slack_app_enabled
|
极狐GitLab for Slack 应用程序的验证令牌。此身份验证方法已被 Slack 弃用,仅用于对应用程序的斜杠命令进行身份验证。 |
snippet_size_limit |
integer | no | 字节中代码片段内容的最大大小。默认值:52428800 字节(50 MB)。 |
snowplow_app_id |
string | no | Snowplow 站点名称 / 应用程序 ID。(例如,gitlab ) |
snowplow_collector_hostname |
string | required by: snowplow_enabled
|
Snowplow 收集器主机名。(例如,snowplowprd.trx.gitlab.net ) |
snowplow_database_collector_hostname |
string | no | 数据库事件的 Snowplow 收集器主机名。(例如,db-snowplow.trx.gitlab.net ) |
snowplow_cookie_domain |
string | no | Snowplow cookie 域。(例如,.gitlab.com ) |
snowplow_enabled |
boolean | no | 启用 Snowplow 跟踪。 |
sourcegraph_enabled |
boolean | no | 启用 Sourcegraph 集成。默认值为 false 。如果启用,要求 sourcegraph_url 。 |
sourcegraph_public_only |
boolean | no | 阻止 Sourcegraph 在私有和内部项目中加载。默认值为 true 。 |
sourcegraph_url |
string | required by: sourcegraph_enabled
|
Sourcegraph 集成的实例 URL。 |
spam_check_endpoint_enabled |
boolean | no | 启用使用外部垃圾检查 API 端点的垃圾检查。默认值为 false 。 |
spam_check_endpoint_url |
string | no | 外部垃圾检查服务端点的 URL。有效的 URI 方案为 grpc 或 tls 。指定 tls 强制通信加密。 |
spam_check_api_key |
string | no | 极狐GitLab 用于访问垃圾检查服务端点的 API 密钥。 |
suggest_pipeline_enabled |
boolean | no | 启用流水线建议横幅。 |
enable_artifact_external_redirect_warning_page |
boolean | no | 显示警告您有关极狐GitLab Pages 用户生成内容的外部重定向页面。 |
terminal_max_session_time |
integer | no | Web 终端 websocket 连接的最大时间(以秒为单位)。设置为 0 表示无限制时间。 |
terms |
text | required by: enforce_terms
|
(要求: enforce_terms ) 服务条款的 Markdown 内容。 |
throttle_authenticated_api_enabled |
boolean | no | (如果启用,要求: throttle_authenticated_api_period_in_seconds 和 throttle_authenticated_api_requests_per_period ) 启用身份验证的 API 请求速率限制。帮助减少请求量(例如,来自爬虫或滥用机器人)。 |
throttle_authenticated_api_period_in_seconds |
integer | required by:throttle_authenticated_api_enabled
|
速率限制周期(以秒为单位)。 |
throttle_authenticated_api_requests_per_period |
integer | required by:throttle_authenticated_api_enabled
|
每个周期每用户的最大请求数。 |
throttle_authenticated_packages_api_enabled |
boolean | no | (如启用,需要: throttle_authenticated_packages_api_period_in_seconds 和 throttle_authenticated_packages_api_requests_per_period ) 启用认证 API 请求速率限制。帮助减少请求量(例如,来自爬虫或滥用的机器人)。查看软件包仓库速率限制以获取更多详细信息。 |
throttle_authenticated_packages_api_period_in_seconds |
integer | required by:throttle_authenticated_packages_api_enabled
|
限制周期(以秒为单位)。查看软件包仓库速率限制以获取更多详细信息。 |
throttle_authenticated_packages_api_requests_per_period |
integer | required by:throttle_authenticated_packages_api_enabled
|
每个用户每个周期的最大请求数。查看软件包仓库速率限制以获取更多详细信息。 |
throttle_authenticated_web_enabled |
boolean | no | (If enabled, requires: throttle_authenticated_web_period_in_seconds and throttle_authenticated_web_requests_per_period ) 启用认证网页请求速率限制。帮助减少请求量(例如,来自爬虫或滥用的机器人)。 |
throttle_authenticated_web_period_in_seconds |
integer | required by:throttle_authenticated_web_enabled
|
限制周期(以秒为单位)。 |
throttle_authenticated_web_requests_per_period |
integer | required by:throttle_authenticated_web_enabled
|
每个用户每个周期的最大请求数。 |
throttle_unauthenticated_enabled |
boolean | no | (在极狐GitLab 14.3 中弃用。使用 throttle_unauthenticated_web_enabled 或 throttle_unauthenticated_api_enabled 取而代之。) (如启用, 需要: throttle_unauthenticated_period_in_seconds 和 throttle_unauthenticated_requests_per_period ) 启用未认证网页请求速率限制。帮助减少请求量(例如,来自爬虫或滥用的机器人)。 |
throttle_unauthenticated_period_in_seconds |
integer | 需要 by:throttle_unauthenticated_enabled
|
(在极狐GitLab 14.3 中弃用。使用throttle_unauthenticated_web_period_in_seconds 或 throttle_unauthenticated_api_period_in_seconds 取而代之。) 限制周期(以秒为单位)。 |
throttle_unauthenticated_requests_per_period |
integer | 需要 by:throttle_unauthenticated_enabled
|
(在极狐GitLab 14.3 中弃用。使用 throttle_unauthenticated_web_requests_per_period 或 throttle_unauthenticated_api_requests_per_period 取代。) 每个 IP 每个周期的最大请求数。 |
throttle_unauthenticated_api_enabled |
boolean | no | (如启用,需要: throttle_unauthenticated_api_period_in_seconds 和 throttle_unauthenticated_api_requests_per_period ) 启用未认证 API 请求速率限制。帮助减少请求量(例如,来自爬虫或滥用的机器人)。 |
throttle_unauthenticated_api_period_in_seconds |
integer | required by:throttle_unauthenticated_api_enabled
|
限制周期(以秒为单位)。 |
throttle_unauthenticated_api_requests_per_period |
integer | required by:throttle_unauthenticated_api_enabled
|
每个 IP 每个周期的最大请求数。 |
throttle_unauthenticated_packages_api_enabled |
boolean | no | (如启用,需要: throttle_unauthenticated_packages_api_period_in_seconds 和 throttle_unauthenticated_packages_api_requests_per_period ) 启用未认证 API 请求速率限制。帮助减少请求量(例如,来自爬虫或滥用的机器人)。查看软件包仓库速率限制以获取更多详细信息。 |
throttle_unauthenticated_packages_api_period_in_seconds |
integer | required by:throttle_unauthenticated_packages_api_enabled
|
限制周期(以秒为单位)。查看软件包仓库速率限制以获取更多详细信息。 |
throttle_unauthenticated_packages_api_requests_per_period |
integer | required by:throttle_unauthenticated_packages_api_enabled
|
每个用户每个周期的最大请求数。查看软件包仓库速率限制以获取更多详细信息。 |
throttle_unauthenticated_web_enabled |
boolean | no | (如启用,需要: throttle_unauthenticated_web_period_in_seconds and throttle_unauthenticated_web_requests_per_period ) 启用未认证网页请求速率限制。帮助减少请求量(例如,来自爬虫或滥用的机器人)。 |
throttle_unauthenticated_web_period_in_seconds |
integer | required by:throttle_unauthenticated_web_enabled
|
限制周期(以秒为单位)。 |
throttle_unauthenticated_web_requests_per_period |
integer | required by:throttle_unauthenticated_web_enabled
|
每个 IP 每个周期的最大请求数。 |
time_tracking_limit_to_hours |
boolean | no | 将时间跟踪单位限制为小时显示。默认值为 false 。 |
two_factor_grace_period |
integer | required by: require_two_factor_authentication
|
用户可跳过强制配置双重身份验证的时间(以小时为单位)。 |
unconfirmed_users_delete_after_days |
integer | no | 指定注册后多少天删除未确认邮箱的用户。仅在 delete_unconfirmed_users 设置为 true 时适用。必须为 1 或更大。默认值为 7 。引入于极狐GitLab 16.1。极狐GitLab 私有化部署、专业版和旗舰版专属。 |
unique_ips_limit_enabled |
boolean | no | (If enabled, requires: unique_ips_limit_per_user and unique_ips_limit_time_window ) 限制从多个 IP 登录。 |
unique_ips_limit_per_user |
integer | required by: unique_ips_limit_enabled
|
每个用户的最大 IP 数量。 |
unique_ips_limit_time_window |
integer | required by: unique_ips_limit_enabled
|
IP 被计入限制的时间(以秒为单位)。 |
update_runner_versions_enabled |
boolean | no | 从 JihuLab.com 获取极狐GitLab Runner 发布版本数据。有关更多信息,请参见如何确定哪些 runner 需要升级。 |
usage_ping_enabled |
boolean | no | 每周,极狐GitLab 将许可证使用情况报告回极狐GitLab, Inc。 |
use_clickhouse_for_analytics |
boolean | no | 启用 ClickHouse 作为分析报告的数据源。必须配置 ClickHouse 才能使此设置生效。仅在专业版和旗舰版中可用。 |
include_optional_metrics_in_service_ping |
boolean | no | 是否在服务 Ping 中启用可选指标。引入于极狐GitLab 16.10。 |
user_deactivation_emails_enabled |
boolean | no | 在账户停用时向用户发送电子邮件。 |
user_default_external |
boolean | no | 新注册用户默认是外部用户。 |
user_default_internal_regex |
string | no | 指定一个邮箱地址正则表达式来识别默认内部用户。 |
user_defaults_to_private_profile |
boolean | no | 新创建的用户默认拥有私人资料。引入于极狐GitLab 15.8。默认值为 false 。 |
user_oauth_applications |
boolean | no | 允许用户注册任何应用程序以使用极狐GitLab 作为 OAuth 提供者。此设置不影响群组级 OAuth 应用程序。 |
user_show_add_ssh_key_message |
boolean | no | 当设置为 false 时,禁用显示给没有上传 SSH 密钥的用户的 您将无法通过 SSH 拉取或推送项目代码 警告。 |
version_check_enabled |
boolean | no | 让极狐GitLab 在更新可用时通知您。 |
valid_runner_registrars |
array of strings | no | 允许注册极狐GitLab Runner 的类型列表。可以是 [] 、['group'] 、['project'] 或 ['group', 'project'] 。 |
vscode_extension_marketplace |
hash | no | VS Code 扩展市场的设置。由Web IDE和工作空间使用。 |
whats_new_variant |
string | no | 新功能变体,可能的值:all_tiers 、current_tier 和 disabled 。 |
wiki_page_max_content_bytes |
integer | no | 最大维基页面内容大小,以字节为单位。默认值:52428800 字节(50 MB)。最小值为 1024 字节。 |
bulk_import_concurrent_pipeline_batch_limit |
integer | no | 最大同时直接传输批量导出数。 |
concurrent_relation_batch_export_limit |
integer | no | 最大同时批量导出作业数。引入于极狐GitLab 17.6。 |
asciidoc_max_includes |
integer | no | 在任何一个文档中处理的 AsciiDoc 包含指令的最大限制。默认值:32。最大值:64。 |
nuget_skip_metadata_url_validation |
boolean | no | 是否跳过 NuGet 软件包的元数据 URL 验证。引入于极狐GitLab 17.0。 |
helm_max_packages_count |
integer | no | 每个频道可列出的最大 Helm 软件包数量。必须至少为 1。默认值为 1000。 |
require_admin_two_factor_authentication |
boolean | no | 允许管理员要求实例上的所有管理员启用 2FA。 |
secret_push_protection_available |
boolean | no | 允许项目启用秘密推送保护。这并不启用秘密推送保护。仅限旗舰版。 |
非活动项目设置
您可以配置非活动项目删除或关闭此功能。
属性 | 类型 | 是否必需 | 描述 |
---|---|---|---|
delete_inactive_projects |
boolean | no | 启用非活动项目删除。默认值为 false 。在极狐GitLab 15.4 开始起作用。 |
inactive_projects_delete_after_months |
integer | no | 如果 delete_inactive_projects 为 true ,则等待删除非活动项目的时间(以月为单位)。默认值为 2 。在极狐GitLab 15.0 开始起作用。 |
inactive_projects_min_size_mb |
integer | no | 如果 delete_inactive_projects 为 true ,则检查项目是否非活动的最小存储库大小。默认值为 0 。在极狐GitLab 15.0 开始起作用。 |
inactive_projects_send_warning_email_after_months |
integer | no | 如果 delete_inactive_projects 为 true ,设置邮件通知维护者项目因非活动而计划被删除的时间(以月为单位)。默认值为 1 。在极狐GitLab 15.0 开始起作用。 |
清理设置
{{< tabs >}}
{{< tab title=”15.8 and later” >}}
如果 housekeeping_optimize_repository_period
字段设置为整数,则在您指定的 Git 推送次数后执行清理操作。
{{< /tab >}}
{{< tab title=”15.7 and earlier” >}}
housekeeping_enabled
字段启用或禁用 Git 清理。为了正常运作,此字段需要设置 housekeeping_optimize_repository_period
,或 所有 这些值都需要设置:
housekeeping_bitmaps_enabled
housekeeping_full_repack_period
housekeeping_gc_period
{{< /tab >}}
{{< /tabs >}}
软件包仓库设置:软件包文件大小限制
软件包文件大小限制不属于应用程序设置 API 的一部分。相反,这些设置可以通过计划限制 API访问。