2.68. hammer 存储库


操作软件仓库

Usage:
    hammer repository [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 create                        Create a custom repository
 delete, destroy               Destroy a custom repository
 info, show                    Show a repository
 list, index                   List of enabled repositories
 remove-content                Remove content from a repository
 synchronize                   Sync a repository
 update                        Update a repository
 upload-content                Upload content into the repository

Options:
 -h, --help                    Print help

2.68.1. hammer 存储库创建

创建自定义软件仓库

Usage:
    hammer repository create [OPTIONS]

Options:
 --ansible-collection-auth-token ANSIBLE_COLLECTION_AUTH_TOKEN     The token key to use for authentication.
 --ansible-collection-auth-url ANSIBLE_COLLECTION_AUTH_URL         The URL to receive a session token from, e.g. used with Automation Hub.
 --ansible-collection-requirements ANSIBLE_COLLECTION_REQUIREMENTS Contents of requirement yaml file to sync from URL
 --ansible-collection-requirements-file REQUIREMENTS_FILE          Location of the ansible collections requirements.yml file.
 --arch ARCH                                                       Architecture of content in the repository
 --checksum-type CHECKSUM_TYPE                                     Checksum of the repository, currently 'sha1' & 'sha256' are supported
 --content-type CONTENT_TYPE                                       Type of repo
                                                                   Possible value(s): 'ansible_collection', 'docker', 'file', 'yum'
 --deb-architectures DEB_ARCHITECTURES                             Whitespace-separated list of architectures to be synced from deb-archive
 --deb-components DEB_COMPONENTS                                   Whitespace-separated list of repo components to be synced from deb-archive
 --deb-releases DEB_RELEASES                                       Whitespace-separated list of releases to be synced from deb-archive
 --description DESCRIPTION                                         Description of the repository
 --docker-tags-whitelist DOCKER_TAGS_WHITELIST                     Comma-separated list of tags to sync for Container Image repository
                                                                   Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                                   JSON is acceptable and preferred way for complex parameters
 --docker-upstream-name DOCKER_UPSTREAM_NAME                       Name of the upstream docker repository
 --download-concurrency DOWNLOAD_CONCURRENCY                       Used to determine download concurrency of the repository in pulp3. Use value less than 20. Defaults to 10
 --download-policy DOWNLOAD_POLICY                                 Download policy for yum repos (either 'immediate' or 'on_demand')
                                                                   Possible value(s): 'immediate', 'on_demand'
 --gpg-key-id GPG_KEY_ID                                           Id of the gpg key that will be assigned to the new repository
 --http-proxy HTTP_PROXY_NAME                                      Name to search by
 --http-proxy-id HTTP_PROXY_ID                                     ID of a HTTP Proxy
 --http-proxy-policy HTTP_PROXY_POLICY                             Policies for HTTP Proxy for content sync
                                                                   Possible value(s): 'global_default_http_proxy', 'none', 'use_selected_http_proxy'
 --ignorable-content IGNORABLE_CONTENT                             List of content units to ignore while syncing a yum repository. Must be subset of srpm
                                                                   Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                                   JSON is acceptable and preferred way for complex parameters
 --label LABEL
 --mirror-on-sync MIRROR_ON_SYNC                                   True if this repository when synced has to be mirrored from the source and stale rpms removed
                                                                   One of true/false, yes/no, 1/0.
 --name NAME                                                       Name of the repository
 --organization ORGANIZATION_NAME                                  Organization name to search by
 --organization-id ORGANIZATION_ID
 --organization-label ORGANIZATION_LABEL                           Organization label to search by
 --organization-title ORGANIZATION_TITLE                           Organization title
 --os-versions OS_VERSIONS                                         Identifies whether the repository should be disabled on a client with a non-matching OS version. Pass [] to enable regardless of OS version. Maximum length 1; allowed tags are: rhel-6, rhel-7, rhel-8
                                                                   Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                                   JSON is acceptable and preferred way for complex parameters
 --ostree-upstream-sync-depth OSTREE_UPSTREAM_SYNC_DEPTH           If a custom sync policy is chosen for ostree repositories then a 'depth' value must be provided
 --ostree-upstream-sync-policy OSTREE_UPSTREAM_SYNC_POLICY         Policies for syncing upstream ostree repositories
                                                                   Possible value(s): 'latest', 'all', 'custom'
 --product PRODUCT_NAME                                            Product name to search by
 --product-id PRODUCT_ID                                           Product the repository belongs to
 --publish-via-http ENABLE                                         Publish Via HTTP
                                                                   One of true/false, yes/no, 1/0.
 --ssl-ca-cert-id SSL_CA_CERT_ID                                   Identifier of the content credential containing the SSL CA Cert
 --ssl-client-cert-id SSL_CLIENT_CERT_ID                           Identifier of the content credential containing the SSL Client Cert
 --ssl-client-key-id SSL_CLIENT_KEY_ID                             Identifier of the content credential containing the SSL Client Key
 --upstream-authentication-token UPSTREAM_AUTHENTICATION_TOKEN     Password of the upstream authentication token.
 --upstream-password UPSTREAM_PASSWORD                             Password of the upstream repository user used for authentication
 --upstream-username UPSTREAM_USERNAME                             Username of the upstream repository user used for authentication
 --url URL                                                         Repository source url
 --verify-ssl-on-sync VERIFY_SSL_ON_SYNC                           If true, Katello will verify the upstream url's SSL certifcates are signed by a trusted CA
                                                                   One of true/false, yes/no, 1/0.
 -h, --help                                                        Print help

2.68.2. hammer 存储库删除

销毁自定义软件仓库

Usage:
    hammer repository <delete|destroy> [OPTIONS]

Options:
 --id ID
 --name NAME                             Repository name to search by
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID       Organization ID to search by
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --product PRODUCT_NAME                  Product name to search by
 --product-id PRODUCT_ID                 Product numeric identifier
 -h, --help                              Print help

2.68.3. hammer 存储库信息

显示软件仓库

Usage:
    hammer repository <info|show> [OPTIONS]

Options:
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID                                 Repository ID
 --name NAME                             Repository name to search by
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID       Organization ID
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --organization-title ORGANIZATION_TITLE Organization title
 --product PRODUCT_NAME                  Product name to search by
 --product-id PRODUCT_ID                 Product numeric identifier
 -h, --help                              Print help

Predefined field sets:
  ----------------------------------------------|-----|---------|-----
  FIELDS                                        | ALL | DEFAULT | THIN
  ----------------------------------------------|-----|---------|-----
  Id                                            | x   | x       | x
  Name                                          | x   | x       | x
  Label                                         | x   | x       |
  Description                                   | x   | x       |
  Organization                                  | x   | x       |
  Red hat repository                            | x   | x       |
  Content type                                  | x   | x       |
  Checksum type                                 | x   | x       |
  Mirror on sync                                | x   | x       |
  Url                                           | x   | x       |
  Publish via http                              | x   | x       |
  Published at                                  | x   | x       |
  Relative path                                 | x   | x       |
  Download policy                               | x   | x       |
  Ostree upstream sync policy                   | x   | x       |
  Ostree upstream sync depth                    | x   | x       |
  Upstream repository name                      | x   | x       |
  Container image tags filter                   | x   | x       |
  Container repository name                     | x   | x       |
  Ignorable content units                       | x   | x       |
  Http proxy/id                                 | x   | x       |
  Http proxy/name                               | x   | x       |
  Http proxy/http proxy policy                  | x   | x       |
  Product/id                                    | x   | x       |
  Product/name                                  | x   | x       |
  Gpg key/id                                    | x   | x       |
  Gpg key/name                                  | x   | x       |
  Sync/status                                   | x   | x       |
  Sync/last sync date                           | x   | x       |
  Created                                       | x   | x       |
  Updated                                       | x   | x       |
  Content counts/packages                       | x   | x       |
  Content counts/source rpms                    | x   | x       |
  Content counts/package groups                 | x   | x       |
  Content counts/errata                         | x   | x       |
  Content counts/container image manifest lists | x   | x       |
  Content counts/container image manifests      | x   | x       |
  Content counts/container image tags           | x   | x       |
  Content counts/ostree branches                | x   | x       |
  Content counts/files                          | x   | x       |
  Content counts/module streams                 | x   | x       |
  ----------------------------------------------|-----|---------|-----

2.68.4. hammer 存储库列表

启用的存储库列表

Usage:
    hammer repository <list|index> [OPTIONS]

Options:
 --ansible-collection ANSIBLE_COLLECTION_NAME        Name to search by
 --ansible-collection-id ANSIBLE_COLLECTION_ID       Id of an ansible collection to find repositories that contain the ansible collection
 --archived ARCHIVED                                 Show archived repositories
                                                     One of true/false, yes/no, 1/0.
 --available-for AVAILABLE_FOR                       Interpret specified object to return only Repositories that can be associated with specified object.  Only 'content_view' & 'content_view_version' are supported.
 --content-type CONTENT_TYPE                         Limit to only repositories of this type
                                                     Possible value(s): 'ansible_collection', 'docker', 'file', 'yum'
 --content-view CONTENT_VIEW_NAME                    Content view name to search by
 --content-view-id CONTENT_VIEW_ID                   ID of a content view to show repositories in
 --content-view-version CONTENT_VIEW_VERSION_VERSION Content view version number
 --content-view-version-id CONTENT_VIEW_VERSION_ID   ID of a content view version to show repositories in
 --deb DEB_NAME                                      Name to search by
 --deb-id DEB_ID                                     Id of a deb package to find repositories that contain the deb
 --description DESCRIPTION                           Description of the repository
 --download-policy DOWNLOAD_POLICY                   Limit to only repositories with this download policy
                                                     Possible value(s): 'immediate', 'on_demand'
 --environment ENVIRONMENT_NAME                      Lifecycle environment name to search by (--environment is deprecated: Use --lifecycle-environment instead)
 --environment-id ENVIRONMENT_ID                     (--environment-id is deprecated: Use --lifecycle-environment-id instead)
 --erratum-id ERRATUM_ID                             Id of an erratum to find repositories that contain the erratum
 --fields FIELDS                                     Show specified fields or predefined field sets only. (See below)
                                                     Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                     JSON is acceptable and preferred way for complex parameters
 --file-id FILE_ID                                   Id of a file to find repositories that contain the file
 --full-result FULL_RESULT                           Whether or not to show all results
                                                     One of true/false, yes/no, 1/0.
 --label LABEL                                       Label of the repository
 --library LIBRARY                                   Show repositories in Library and the default content view
                                                     One of true/false, yes/no, 1/0.
 --lifecycle-environment LIFECYCLE_ENVIRONMENT_NAME  Lifecycle environment name to search by
 --lifecycle-environment-id LIFECYCLE_ENVIRONMENT_ID
 --name NAME                                         Name of the repository
 --order ORDER                                       Sort field and order, eg. 'id DESC'
 --organization ORGANIZATION_NAME                    Organization name to search by
 --organization-id ORGANIZATION_ID                   ID of an organization to show repositories in
 --organization-label ORGANIZATION_LABEL             Organization label to search by
 --organization-title ORGANIZATION_TITLE             Organization title
 --ostree-branch OSTREE_BRANCH_NAME                  Name to search by
 --ostree-branch-id OSTREE_BRANCH_ID                 Id of an ostree branch to find repositories that contain that branch
 --page PAGE                                         Page number, starting at 1
 --per-page PER_PAGE                                 Number of results per page to return
 --product PRODUCT_NAME                              Product name to search by
 --product-id PRODUCT_ID                             ID of a product to show repositories of
 --rpm-id RPM_ID                                     Id of a rpm package to find repositories that contain the rpm
 --search SEARCH                                     Search string
 --username USERNAME                                 Only show the repositories readable by this user with this username
 --with-content WITH_CONTENT                         Only repositories having at least one of the specified content type ex: rpm , erratum
                                                     Possible value(s): 'ansible collection', 'docker_manifest', 'docker_manifest_list', 'docker_tag', 'docker_blob', 'file', 'rpm', 'modulemd', 'erratum', 'distribution', 'package_category', 'package_group', 'yum_repo_metadata_file', 'srpm'
 -h, --help                                          Print help

Predefined field sets:
  -------------|-----|---------|-----
  FIELDS       | ALL | DEFAULT | THIN
  -------------|-----|---------|-----
  Id           | x   | x       | x
  Name         | x   | x       | x
  Product      | x   | x       |
  Content type | x   | x       |
  Url          | x   | x       |
  -------------|-----|---------|-----

Search / Order fields:
  container_repository_name  string
  content_label              string
  content_type               string
  content_view_id            integer
  description                text
  distribution_arch          string
  distribution_bootable      boolean
  distribution_family        string
  distribution_variant       string
  distribution_version       string
  download_policy            string
  label                      string
  name                       string
  product                    string
  product_id                 integer
  product_name               string
  redhat                     Values: true, false

2.68.5. hammer 存储库 remove-content

从存储库中删除内容

Usage:
    hammer repository remove-content [OPTIONS]

Options:
 --content-type CONTENT_TYPE             Content type ('deb', 'docker_manifest', 'file', 'ostree', 'rpm', 'srpm')
                                         Possible value(s): 'docker_manifest', 'file', 'rpm', 'srpm'
 --id ID                                 Repository ID
 --ids IDS                               Array of content ids to remove
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --name NAME                             Repository name to search by
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID       Organization ID to search by
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --product PRODUCT_NAME                  Product name to search by
 --product-id PRODUCT_ID                 Product numeric identifier
 --sync-capsule SYNC_CAPSULE             Whether or not to sync an external capsule after upload. Default: true
                                         One of true/false, yes/no, 1/0.
 -h, --help                              Print help

2.68.6. hammer 存储库同步

同步存储库

Usage:
    hammer repository synchronize [OPTIONS]

Options:
 --async                                   Do not wait for the task
 --id ID                                   Repository ID
 --incremental INCREMENTAL                 Perform an incremental import
                                           One of true/false, yes/no, 1/0.
 --name NAME                               Repository name to search by
 --organization ORGANIZATION_NAME          Organization name to search by
 --organization-id ORGANIZATION_ID         Organization ID
 --organization-label ORGANIZATION_LABEL   Organization label to search by
 --organization-title ORGANIZATION_TITLE   Organization title
 --product PRODUCT_NAME                    Product name to search by
 --product-id PRODUCT_ID                   Product numeric identifier
 --skip-metadata-check SKIP_METADATA_CHECK Force sync even if no upstream changes are detected. Only used with yum repositories.
                                           One of true/false, yes/no, 1/0.
 --source-url SOURCE_URL                   Temporarily override feed URL for sync
 --validate-contents VALIDATE_CONTENTS     Force a sync and validate the checksums of all content. Only used with yum repositories.
                                           One of true/false, yes/no, 1/0.
 -h, --help                                Print help

2.68.7. hammer 存储库更新

更新软件仓库

Usage:
    hammer repository update [OPTIONS]

Options:
 --ansible-collection-auth-token ANSIBLE_COLLECTION_AUTH_TOKEN     The token key to use for authentication.
 --ansible-collection-auth-url ANSIBLE_COLLECTION_AUTH_URL         The URL to receive a session token from, e.g. used with Automation Hub.
 --ansible-collection-requirements ANSIBLE_COLLECTION_REQUIREMENTS Contents of requirement yaml file to sync from URL
 --ansible-collection-requirements-file REQUIREMENTS_FILE          Location of the ansible collections requirements.yml file.
 --arch ARCH                                                       Architecture of content in the repository
 --checksum-type CHECKSUM_TYPE                                     Checksum of the repository, currently 'sha1' & 'sha256' are supported
 --deb-architectures DEB_ARCHITECTURES                             Whitespace-separated list of architectures to be synced from deb-archive
 --deb-components DEB_COMPONENTS                                   Whitespace-separated list of repo components to be synced from deb-archive
 --deb-releases DEB_RELEASES                                       Whitespace-separated list of releases to be synced from deb-archive
 --description DESCRIPTION                                         Description of the repository
 --docker-digest DIGEST                                            Container Image manifest digest
 --docker-tag TAG                                                  Container Image tag
 --docker-tags-whitelist DOCKER_TAGS_WHITELIST                     Comma-separated list of tags to sync for Container Image repository
                                                                   Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                                   JSON is acceptable and preferred way for complex parameters
 --docker-upstream-name DOCKER_UPSTREAM_NAME                       Name of the upstream docker repository
 --download-concurrency DOWNLOAD_CONCURRENCY                       Used to determine download concurrency of the repository in pulp3. Use value less than 20. Defaults to 10
 --download-policy DOWNLOAD_POLICY                                 Download policy for yum repos (either 'immediate' or 'on_demand')
                                                                   Possible value(s): 'immediate', 'on_demand'
 --gpg-key-id GPG_KEY_ID                                           Id of the gpg key that will be assigned to the new repository
 --http-proxy HTTP_PROXY_NAME                                      Name to search by
 --http-proxy-id HTTP_PROXY_ID                                     ID of a HTTP Proxy
 --http-proxy-policy HTTP_PROXY_POLICY                             Policies for HTTP Proxy for content sync
                                                                   Possible value(s): 'global_default_http_proxy', 'none', 'use_selected_http_proxy'
 --id ID                                                           Repository ID
 --ignorable-content IGNORABLE_CONTENT                             List of content units to ignore while syncing a yum repository. Must be subset of srpm
                                                                   Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                                   JSON is acceptable and preferred way for complex parameters
 --mirror-on-sync MIRROR_ON_SYNC                                   True if this repository when synced has to be mirrored from the source and stale rpms removed
                                                                   One of true/false, yes/no, 1/0.
 --name NAME                                                       Repository name to search by
 --new-name NEW_NAME
 --organization ORGANIZATION_NAME                                  Organization name to search by
 --organization-id ORGANIZATION_ID                                 Organization ID to search by
 --organization-label ORGANIZATION_LABEL                           Organization label to search by
 --os-versions OS_VERSIONS                                         Identifies whether the repository should be disabled on a client with a non-matching OS version. Pass [] to enable regardless of OS version. Maximum length 1; allowed tags are: rhel-6, rhel-7, rhel-8
                                                                   Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                                                   JSON is acceptable and preferred way for complex parameters
 --ostree-upstream-sync-depth OSTREE_UPSTREAM_SYNC_DEPTH           If a custom sync policy is chosen for ostree repositories then a 'depth' value must be provided
 --ostree-upstream-sync-policy OSTREE_UPSTREAM_SYNC_POLICY         Policies for syncing upstream ostree repositories
                                                                   Possible value(s): 'latest', 'all', 'custom'
 --product PRODUCT_NAME                                            Product name to search by
 --product-id PRODUCT_ID                                           Product numeric identifier
 --publish-via-http ENABLE                                         Publish Via HTTP
                                                                   One of true/false, yes/no, 1/0.
 --ssl-ca-cert-id SSL_CA_CERT_ID                                   Identifier of the content credential containing the SSL CA Cert
 --ssl-client-cert-id SSL_CLIENT_CERT_ID                           Identifier of the content credential containing the SSL Client Cert
 --ssl-client-key-id SSL_CLIENT_KEY_ID                             Identifier of the content credential containing the SSL Client Key
 --upstream-authentication-token UPSTREAM_AUTHENTICATION_TOKEN     Password of the upstream authentication token.
 --upstream-password UPSTREAM_PASSWORD                             Password of the upstream repository user used for authentication
 --upstream-username UPSTREAM_USERNAME                             Username of the upstream repository user used for authentication
 --url URL                                                         Repository source url
 --verify-ssl-on-sync VERIFY_SSL_ON_SYNC                           If true, Katello will verify the upstream url's SSL certifcates are signed by a trusted CA
                                                                   One of true/false, yes/no, 1/0.
 -h, --help                                                        Print help

2.68.8. hammer 存储库 upload-content

将内容上传到存储库中

Usage:
    hammer repository upload-content [OPTIONS]

Options:
 --content-type CONTENT_TYPE             Content type ('deb', 'docker_manifest', 'file', 'ostree', 'rpm', 'srpm')
                                         Possible value(s): 'docker_manifest', 'file', 'rpm', 'srpm'
 --fields FIELDS                         Show specified fields or predefined field sets only. (See below)
                                         Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                                         JSON is acceptable and preferred way for complex parameters
 --id ID                                 Repository ID
 --name NAME                             Repository name to search by
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID       Organization ID
 --organization-label ORGANIZATION_LABEL Organization label to search by
 --organization-title ORGANIZATION_TITLE Organization title
 --path PATH                             Upload file, directory of files, or glob of files as content for a repository.
                                         Globs must be escaped by single or double quotes
 --product PRODUCT_NAME                  Product name to search by
 --product-id PRODUCT_ID                 Product numeric identifier
 -h, --help                              Print help

Predefined field sets:
  ------
  FIELDS
  ------
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.