Disabling Git SSH access on GitHub Enterprise Server

You can prevent people from using Git over SSH for certain or all repositories on your GitHub Enterprise Server instance.

In this article

Did this doc help you?

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.

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 a GitHub Enterprise Server administrative account, click in the upper-right corner of any page.
    Rocketship icon for accessing site admin settings
  2. In the search field, type the name of the repository and click Search.
    Site admin settings search field
  3. In the search results, click the name of the repository.
    Site admin settings search options
  4. From a GitHub Enterprise Server administrative account, click in the upper-right corner of any page.
    Rocketship icon for accessing site admin settings
  5. In the upper-right corner of the page, click Admin.
    Admin Tools
  6. In the left sidebar, click Admin.
    Admin Tools
  7. Under "Git SSH access", use the drop-down menu, and click Disabled.
    Git SSH access drop-down menu with disabled option selected

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

  1. From a GitHub Enterprise Server administrative account, click in the upper-right corner of any page.
    Rocketship icon for accessing site admin settings
  2. In the search field, type the name of the user or organization and click Search.
    Site admin settings search field
  3. In the search results, click the name of the user or organization.
    Site admin settings search options
  4. From a GitHub Enterprise Server administrative account, click in the upper-right corner of any page.
    Rocketship icon for accessing site admin settings
  5. In the upper-right corner of the page, click Admin.
    Admin Tools
  6. In the left sidebar, click Admin.
    Admin Tools
  7. Under "Git SSH access", use the drop-down menu, and click Disabled. Then, select Enforce on all repositories.
    Git SSH access drop-down menu with disabled option selected

Disabling Git SSH access to all repositories on an appliance

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

    Rocketship icon for accessing site admin settings

  2. In the left sidebar, click Enterprise overview.

    Enterprise overview tab in the Site admin settings

  3. In the enterprise sidebar, click Policies.

    Policies tab in the enterprise account sidebar

  4. Under Policies, click Options.

    Options tab in the enterprise account settings sidebar

  5. Under "Git SSH access", use the drop-down menu, and click Disabled. Then, select Enforce on all repositories.

    Git SSH access drop-down menu with disabled option selected

Did this doc help you?

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.