Skip to main content

This version of GitHub Enterprise Server will be discontinued on 2024-06-29. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise Server. For help with the upgrade, contact GitHub Enterprise support.

Disabling Git SSH access on your enterprise

You can prevent people from using Git over SSH for certain or all repositories on your enterprise.

Disabling Git SSH access to a specific repository

Note: Each repository automatically inherits default settings from the organization or user that owns it. You cannot override the default setting if the repository's owner has enforced the setting on all of their repositories.

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .
  2. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.
  3. Under "Search users, organizations, teams, repositories, gists, and applications", type the name of the repository in the text field. Then to the right of the field, click Search. Screenshot of the "Search" page of the "Site admin" settings. The button to search repositories, labeled "Search," is highlighted with an orange outline.
  4. Under "Search results – Repositories", click the name of the repository.
  5. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .
  6. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.
  7. In the upper-right corner of the page, click Admin. Screenshot of the header of the "Site admin" page for a user or repository. The "Admin" tab is highlighted with an orange outline.
  8. Under "Git SSH access", select the drop-down menu, and click Disabled.

Disabling Git SSH access to all repositories owned by a user or organization

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .

  2. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.

  3. Under "Search users, organizations, teams, repositories, gists, and applications", type the name of the user or organization in the text field. Then to the right of the field, click Search. Screenshot of the "Search" page of the "Site admin" settings. The button to search users and organizations, labeled "Search," is highlighted with an orange outline.

  4. In the search results, click the name of the user or organization. Screenshot of the "Accounts" search results. In the list of matches, "user1" is highlighted with an orange outline.

  5. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .

  6. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.

  7. In the upper-right corner of the page, click Admin. Screenshot of the header of the "Site admin" page for a user or repository. The "Admin" tab is highlighted with an orange outline.

  8. Under "Git SSH access", select the drop-down menu, and click Disabled.

  9. Select Enforce on all repositories.

    Screenshot of the "Git SSH access" section of the site admin page for an organization. The "Enforce on all repositories" checkbox is highlighted with an orange outline.

Disabling Git SSH access to all repositories in your enterprise

  1. In the top-right corner of GitHub Enterprise Server, click your profile photo, then click Enterprise settings.

    Screenshot of the drop-down menu that appears when you click the profile photo on GitHub Enterprise Server. The "Enterprise settings" option is highlighted in a dark orange outline.

  2. In the enterprise account sidebar, click Policies.

  3. Under Policies, click Options.

  4. Under "Git SSH access", select the drop-down menu, and click Disabled.

  5. Select Enforce on all repositories.

    Screenshot of the "Git SSH access" section on the enterprise's policies page. The "Enforce on all repositories" checkbox is highlighted with an orange outline.