Enabling or disabling individual package ecosystems
To prevent new packages from being uploaded, you can set an ecosystem you previously enabled to Read-Only, while still allowing existing packages to be downloaded.
-
从 GitHub Enterprise Server 上的管理帐户中,在任何页面的右上角,单击 。
-
如果您尚未进入“站点管理员”页面,请在左上角单击 Site admin(站点管理员)。
-
在左侧边� �中,单击 管理控制台。
-
在左边� �中,单击 Packages(包)。
-
Under "Ecosystem Toggles", for each package type, select Enabled, Read-Only, or Disabled.
-
在左侧边� �下,单击 Save settings(保存设置)。
注意: 管理控制台 中的保存设置将重新启动系统服务,这可能会导致用户可见的停机时间。
-
等待配置运行完毕。
Connecting to the official npm registry
If you've enabled npm packages on your enterprise and want to allow access to the official npm registry as well as the GitHub Packages npm registry, then you must perform some additional configuration.
GitHub Packages uses a transparent proxy for network traffic that connects to the official npm registry at registry.npmjs.com
. The proxy is enabled by default and cannot be disabled.
To allow network connections to the npm registry, you will need to configure network ACLs that allow GitHub Enterprise Server to send HTTPS traffic to registry.npmjs.com
over port 443:
Source | Destination | Port | Type |
---|---|---|---|
GitHub Enterprise Server | registry.npmjs.com | TCP/443 | HTTPS |
Note that connections to registry.npmjs.com
traverse through the Cloudflare network, and subsequently do not connect to a single static IP address; instead, a connection is made to an IP address within the CIDR ranges listed here: https://www.cloudflare.com/ips/.
If you wish to enable npm upstream sources, select Enabled
for npm upstreaming
.
Next steps
As a next step, we recommend you check if you need to update or upload a TLS certificate for your packages host URL. For more information, see "Getting started with GitHub Packages for your enterprise."