You may need to set GitLab Features when you face Path must not start or end with a special character and must not contain consecutive special characters like below:


To change its feature option, you should run gitrlab-rails consone like below:

gitlab-rails console

Then you will see following screen:


To enable a feature, run:

Feature.enable(:<feature flag>)


To disable a feature, run:

Feature.disable(:<feature flags>)


To remove a feature, run:

Feature.remove(:<feature flags>)



Feature.enable and Feature.disable always return true, even if the application doesn't use the flag:


irb(main):006:0> Feature.enable(:restrict_special_characters_in_project_path)
WARNING: Understand the stability and security risks of enabling in-development features with feature flags.
See https://docs.gitlab.com/ee/administration/feature_flags.html#risks-when-enabling-features-still-in-development for more information.
=> true
irb(main):007:0> Feature.disable(:restrict_special_characters_in_project_path)
=> true


When the feature is ready, FitLab removes the feature flag, and the option for enabling and disabling it no longer exists. The feature becomes available in all instances.


In this case, you should run Feature.disable after starting gitlab-rails console like below:

irb(main):003:0> Feature.disable(:restrict_special_characters_in_project_path)
=> true



To take a look the status of all the features, run Feature.all like below:

irb(main):008:0> Feature.all
=> [#<Flipper::Feature:296920 name=:restrict_special_characters_in_project_path, state=:off, enabled_gate_names=[], adapter=:memoizable>]