0
0
Fork 0
mirror of https://codeberg.org/forgejo/docs.git synced 2024-11-28 18:42:51 -05:00
forgejo-docs/user/packages/chef.md
Earl Warren 2f5e7530ad
docs: 1.20: follow Gitea renames
Gitea commits:

* 8857e97b5f617e1c625b66fd7f5cc18c44192ced
* e8433b7fe6dd1dfa5ecf0633568cc3e34caeb0f9

# Conflicts:
#	user/push-options.md
2023-08-13 13:43:03 +01:00

2.6 KiB

layout title license origin_url
~/layouts/Markdown.astro Chef Packages Repository Apache-2.0 e8433b7fe6/docs/content/doc/packages/chef.en-us.md

Publish Chef cookbooks for your user or organization.

Requirements

To work with the Chef package registry, you have to use knife.

Authentication

The Chef package registry does not use an username:password authentication but signed requests with a private:public key pair. Visit the package owner settings page to create the necessary key pair. Only the public key is stored inside Forgejo. if you loose access to the private key you must re-generate the key pair. Configure knife to use the downloaded private key with your Forgejo username as client_name.

Configure the package registry

To configure knife to use the Forgejo package registry add the url to the ~/.chef/config.rb file.

knife[:supermarket_site] = 'https://forgejo.example.com/api/packages/{owner}/chef'
Parameter Description
owner The owner of the package.

Publish a package

To publish a Chef package execute the following command:

knife supermarket share {package_name}
Parameter Description
package_name The package name.

You cannot publish a package if a package of the same name and version already exists. You must delete the existing package first.

Install a package

To install a package from the package registry, execute the following command:

knife supermarket install {package_name}

Optional you can specify the package version:

knife supermarket install {package_name} {package_version}
Parameter Description
package_name The package name.
package_version The package version.

Delete a package

If you want to remove a package from the registry, execute the following command:

knife supermarket unshare {package_name}

Optional you can specify the package version:

knife supermarket unshare {package_name}/versions/{package_version}
Parameter Description
package_name The package name.
package_version The package version.