我们经常发布文档更新,此页面的翻译可能仍在进行中。有关最新信息,请访问英文文档。如果此页面上的翻译有问题,请告诉我们

About GitHub Package Registry

GitHub 包注册表 is a software package hosting service, similar to npmjs.org, rubygems.org, or hub.docker.com, that allows you to host your packages and code in one place. You can host software packages privately or publicly and use them as dependencies in your projects.

GitHub 包注册表 is currently available in a limited public beta. To request to join the limited public beta, see the GitHub 包注册表 page. You should avoid using GitHub 包注册表 for high-value workflows and content during the beta period.

In this article

About GitHub 包注册表

GitHub 包注册表 allows you to develop your code and host your packages in one place. You can use packages from GitHub 包注册表 as a dependency in your source code on GitHub.

GitHub uses the README in your repository to generate the package's description, and you can edit it to reflect details about the package or installation process. GitHub adds metadata for each package version that includes links to the author, repository, commit SHA, version tags, and date. To see an example registry package page, see the @Codertocat/hello-world-npm package.

Registry package page

These are some examples of how GitHub 包注册表 might benefit your workflow:

Supported clients and formats

GitHub 包注册表 uses the native package tooling commands you're already familiar with to publish, query, download, and change package versions.

GitHub 包注册表 currently supports these clients and formats.

Package client Package format Description
npm package.json Node Package Manager for JavaScript. For more information, see "Configuring npm for use with GitHub 包注册表."
gem Gemfile Ruby Gem Package manager for Ruby. For more information, see "Configuring RubyGems for use with GitHub 包注册表."
mvn pom.xml Apache Maven Project management and comprehension tool for Java. For more information, see "Configuring Apache Maven for use with GitHub 包注册表."
gradle build.gradle or build.gradle.kts Gradle build automation tool for Java. For more information, see "Configuring Gradle for use with GitHub 包注册表."
docker container Docker container management platform. For more information, see "Configuring Docker for use with GitHub 包注册表."
nuget nupkg NuGet package management for .NET. For more information, see "Configuring NuGet for use with GitHub 包注册表."

Searching packages on GitHub

You can search for packages on GitHub by navigating to https://github.com/search and entering a package name.

To view registry packages, click Packages in the left sidebar.

Searching registry packages

Deleting a package

To avoid breaking projects that may depend on your packages, GitHub 包注册表 does not support deleting published versions of a package or an entire published package for public repositories. Under special circumstances, such as for legal reasons or to conform with GDPR standards, you can request deleting a package through GitHub 支持. Contact GitHub 支持 using our contact form and the subject line "GitHub 包注册表."

You can delete private packages via GitHub's API. For more information, see "Access to package version deletion" in GitHub 开发者文档.

Contacting support

If you're a participant in the limited public beta, please contact GitHub 支持 using our contact form and the subject line "GitHub 包注册表."

If you're not currently participating in the limited public beta, you can request to join the limited public beta on the GitHub 包注册表 page.

问问别人

找不到要找的内容?

联系我们