Skip to main content

此版本的 GitHub Enterprise 已停止服务 2022-10-12. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Publishing a package

You can publish a package to GitHub Packages to make the package available for others to download and re-use.

Who can use this feature

Anyone with write permissions for a repository can publish a package to that repository.

GitHub Packages 适用于 GitHub Free、GitHub Pro、面向组织的 GitHub Free、GitHub Team, GitHub Enterprise Cloud, GitHub Enterprise Server 3.0 或更高版本以及 GitHub AE。 有关升级 GitHub Enterprise Server 实例更多信息,请参阅“关于升级至新版本”和 升级助手以从� 当前的发布版本中查找升级路径。

About published packages

You can help people understand and use your package by providing a description and other details like installation and usage instructions on the package page. GitHub Enterprise Server provides metadata for each version, such as the publication date, download activity, and recent versions. For an example package page, see @Codertocat/hello-world-npm.

可以在公共存储库存储库中发布包(公共包)以与企业中每个人共享,或者在专用存储库(专用包)中与协作者或组织共享。 A repository can be connected to more than one package. To prevent confusion, make sure the README and description clearly provide information about each package.

Publishing a package

You can publish a package to GitHub Packages using any package type enabled for your instance by following the same general guidelines.

  1. Create or use an existing personal access token with the appropriate scopes for the task you want to accomplish. For more information, see "About permissions for GitHub Packages."
  2. Authenticate to GitHub Packages using your personal access token and the instructions for your package client.
  3. Publish the package using the instructions for your package client.

For instructions specific to your package client, see "Working with a GitHub Packages registry."

After you publish a package, you can view the package on GitHub. For more information, see "Viewing packages."