1
0
mirror of synced 2025-12-19 18:10:59 -05:00
Files
docs/content/code-security/code-scanning/troubleshooting-code-scanning/cannot-enable-codeql-in-a-private-repository.md
Felicity Chapman 8c62486a96 Docs for new Secret risk assessment, GHAS SKU unbundling, and expansion to Team plan - ships 1st April (UK morning) (#54748)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com>
Co-authored-by: mchammer01 <42146119+mchammer01@users.noreply.github.com>
Co-authored-by: Anne-Marie <102995847+am-stead@users.noreply.github.com>
Co-authored-by: Hector Alfaro <hectorsector@github.com>
Co-authored-by: Vanessa <vgrl@github.com>
Co-authored-by: Erin Havens <erinhav@github.com>
Co-authored-by: Aaron Waggener <73763104+aaronwaggener@users.noreply.github.com>
Co-authored-by: Sam Browning <106113886+sabrowning1@users.noreply.github.com>
Co-authored-by: Sarah Schneider <sarahs@users.noreply.github.com>
Co-authored-by: Sarita Iyer <66540150+saritai@users.noreply.github.com>
Co-authored-by: Sarah Schneider <sarahs@github.com>
2025-04-01 10:29:37 +00:00

3.5 KiB

title, intro, allowTitleToDifferFromFilename, type, topics, versions
title intro allowTitleToDifferFromFilename type topics versions
Cannot enable CodeQL in a private repository {% data variables.product.prodname_GH_code_security %} must be enabled in order to use {% data variables.product.prodname_code_scanning %} on private repositories. true reference
Code scanning
Errors
Troubleshooting
fpt ghes ghec
* * *

{% ifversion fpt %} If you are on a {% data variables.product.prodname_free_team %} or {% data variables.product.prodname_pro %} plan, you can only use {% data variables.product.prodname_code_scanning %} on repositories that are publicly available. To enable {% data variables.product.prodname_code_scanning %} for private or internal repositories, you must upgrade to {% data variables.product.prodname_team %} or {% data variables.product.prodname_enterprise %} with {% data variables.product.prodname_GH_code_security %} and enable {% data variables.product.prodname_code_security %} for the repository. For more information, see AUTOTITLE and AUTOTITLE. {% endif %}

Confirm whether {% data variables.product.prodname_GH_code_security %} is enabled

{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.navigate-to-code-security-and-analysis %}

  1. On the settings page, scroll down to "{% data variables.product.prodname_code_security %}."
  2. If there is an associated and active Enable button, {% data variables.product.prodname_code_security %} is available for this repository but not yet enabled.

{% ifversion ghas-products %}

  1. If use of {% data variables.product.prodname_GH_code_security %} is blocked by a policy, "{% octicon "shield" aria-hidden="true" %} Disabled" is shown in place of the Enable button.

    "Screenshot of the {% data variables.product.prodname_GH_advanced_security %}" setting. The disabled option is highlighted in dark orange. {% else %}

  2. If use of {% data variables.product.prodname_GH_code_security %} is blocked by a policy, the Enable button is inactive and the owner of the policy is listed.

    "Screenshot of the {% data variables.product.prodname_GH_advanced_security %}" setting. The enterprise policy owner and the inactive "Enable" button are highlighted in dark orange. {% endif %}

Requesting access to {% data variables.product.prodname_GH_code_security %}

  1. In the "{% data variables.product.prodname_code_security %}" settings, click the enterprise or organization name to display a list of users with access to edit the policy that controls access to {% data variables.product.prodname_GH_code_security %}. For more information, see AUTOTITLE.
  2. Follow your company's policy for requesting access to additional features.

Enabling {% data variables.product.prodname_GH_code_security %}

  1. Open the "Code security" settings page.
  2. Next to the "{% data variables.product.prodname_code_security %}" feature, click Enable.
  3. Rerun {% data variables.product.prodname_code_scanning %}.