-
在 GitHub 上,导航到存储库的主页面。
-
在仓库名称下,单击 “Settings”****。 如果看不到“设置”选项卡,请选择“”下拉菜单,然后单击“设置”。

-
在边栏的“Security”部分中,单击“ Advanced Security”****。
-
如果尚未启用 Secret Protection,请在“Secret Protection”右侧单击 启用。
-
在“Secret Protection”下的“Push Protection”右侧,单击“Enable”****。
延伸阅读
-
[AUTOTITLE](/code-security/secret-scanning/working-with-secret-scanning-and-push-protection) -
[AUTOTITLE](/code-security/secret-scanning/using-advanced-secret-scanning-and-push-protection-features/excluding-folders-and-files-from-secret-scanning) -
[AUTOTITLE](/get-started/learning-about-github/about-github-advanced-security)