Restricting group and project creation
- Go to “Admin” → “Settings” → “General”.
- Expand “Visibility and access controls” and set “Default minimum role required to create projects” to the lowest role that may create projects on the instance.
- Expand “Account and limit”. In the “User restrictions” group, clear the “Allow new users to create top-level groups” and “Allow users with up to Guest role to create groups and personal projects” checkboxes.
- Click “Save changes” in every section you have changed.
The “Allow new users to create top-level groups” checkbox sets the default for accounts created after the change. For an account that already exists, the permission is set in “Admin” → “Overview” → “Users”: open the user, click “Edit” and set the “Can create top-level groups” value.
Enabled Git access protocols
The instance accepts Git operations over SSH and over HTTP(S). To leave one protocol:
- Go to “Admin” → “Settings” → “General”.
- Expand “Visibility and access controls”.
- In the “Enabled Git access protocols” list, select “Only SSH” or “Only HTTP(S)”.
- Click “Save changes”.
Git operations over the protocol that is left out are refused.
Password authentication for Git over HTTPS
- Go to “Admin” → “Settings” → “General”.
- Expand “Sign-in restrictions”.
- Clear the “Allow password authentication for Git over HTTP(S)” checkbox.
- Click “Save changes”.
A Git client then authenticates over HTTPS with a personal access token instead of the account password. When LDAP is configured, the LDAP password is accepted as well.
Two-factor authentication for the whole instance
- Go to “Admin” → “Settings” → “General”.
- Expand “Sign-in restrictions”.
- Select “Enforce two-factor authentication” to require the second factor from every user of the instance, or “Enforce two-factor authentication for administrators” to require it from administrators only.
- In the “Two-factor grace period” field, enter the number of hours during which a user may postpone the setup. The value
0requires the setup at the next sign-in. - Click “Save changes”.
A user who has not set the second factor up is asked to do so on the next sign-in. The methods a user can choose from are described on the Signing in page.
Push rules at the instance level
Push rules set in “Admin” → “Settings” → “Repository” → “Push rules” apply to every project of the instance: a group or a project receives them as its default values and changes them only while the rule allows an override. The rules themselves and the override are described on the Push rules page.