Skip to main content

Эта версия GitHub Enterprise Server была прекращена 2024-03-26. Исправления выпускаться не будут даже при критических проблемах безопасности. Для повышения производительности, повышения безопасности и новых функций выполните обновление до последней версии GitHub Enterprise Server. Чтобы получить справку по обновлению, обратитесь в службу поддержки GitHub Enterprise.

Настройка имени узла для экземпляра

Вы можете предоставить надежный доступ к ваш экземпляр GitHub Enterprise Server путем назначения имени узла, доступного по сети.

About the hostname for GitHub Enterprise Server

To provide reliable access to your GitHub Enterprise Server instance via a known name on the network, you can configure a hostname. If you configure a hostname instead of using a hard-coded IP address, you will be able to change the physical hardware that your GitHub Enterprise Server instance runs on without affecting users or client software.

The hostname setting in the Management Console should be set to an appropriate fully qualified domain name (FQDN) which is resolvable on the internet or within your internal network. For example, your hostname setting could be github.companyname.com. Web and API requests will automatically redirect to the hostname configured in the Management Console. Note that localhost is not a valid hostname setting.

Hostnames must be less than 63 characters in length per Section 2.3.4 of the Domain Names Specification RFC.

After you configure a hostname, you can enable subdomain isolation to further increase the security of your GitHub Enterprise Server instance. For more information, see "Enabling subdomain isolation."

GitHub strongly recommends that you do not change the hostname for an existing GitHub Enterprise Server instance. Changing the hostname will cause unexpected behavior, up to and including instance outages. Instead, configure a new instance with the desired hostname, and then restore settings and data from the original instance to the new instance.

For more information on the supported hostname types, see Section 2.1 of the HTTP RFC.

Configuring the hostname

  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. In the " Site admin" sidebar, click Management Console.

  4. In the "Settings" sidebar, click Hostname.

  5. Under "Hostname", type the hostname you'd like to set for your GitHub Enterprise Server instance.

  6. To test the DNS and SSL settings for the new hostname, click Test domain settings.

  7. If you don't receive a green checkmark next to all entries, review your configuration for the setting that failed. For more information, see "Configuring DNS nameservers."

  8. Under the "Settings" sidebar, click Save settings.

    Note: Saving settings in the Management Console restarts system services, which could result in user-visible downtime.

  9. Wait for the configuration run to complete.

To help mitigate various cross-site scripting vulnerabilities, we recommend that you enable subdomain isolation for your GitHub Enterprise Server instance after you configure a hostname. For more information, see "Enabling subdomain isolation."

Changing the hostname

If you need to change the hostname for your GitHub Enterprise Server instance, you must restore a backup of your existing instance to a new instance with the desired hostname. For more information, see "Changing the hostname for your instance."

Warning: Do not change the hostname for GitHub Enterprise Server after initial setup. Changing the hostname will cause unexpected behavior, up to and including instance outages and invalidation of users' security keys. If you have changed the hostname for your instance and are experiencing problems, contact GitHub Enterprise Support or GitHub Premium Support.