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

-
在边栏的“Security”部分中,单击“ Code security”****。
-
在“Code security”下,查找“GitHub Advanced Security”。
-
在“Secret scanning”下的“推送保护”下,单击“启用”。
延伸阅读
-
[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)