Exclude directory from "Prevent pushing secrets to the repository" option


For some of our customers we store Wordpress websites on Gitlab.

A couple of plugins include the ca bundles. If “Prevent pushing secrets to the repository” is checked, it is not possible to push these to the repo.

Is there any way to exclude a folder (in this case /wp-content/plugins) from this rule?


You can do this by creating a .gitignore file (or edit if it exists already) with /wp-content/plugins in it. The only problem with that is everything inside /wp-content/plugins will be ignored. So you might want to restrict just to certain particular files that you do not wish to push to the repo.