Chapter 3. Red Hat Quay repository overview
A repository provides a central location for storing a related set of container images that share a namespace in Quay. You can group repositories under namespaces for individual users, teams, or organizations.
For example, you might have a namespace for your personal projects, one for your company, or one for a specific team within your organization.
Private repositories provide control over the users that have access to your images by allowing you to define users or teams who can push to, or pull from, the repository, thereby enhancing the security of your registry.
3.1. Adjusting repository visibility by using the UI Copy linkLink copied to clipboard!
To control who can pull or interact with a repository, you can adjust its visibility to public or private by using the Red Hat Quay UI.
Procedure
- On the Red Hat Quay UI, click Repositories in the navigation pane.
- Click the name of a repository.
- Click Settings in the navigation pane.
- Click Repository visibility.
- Click Make private. The repository is made private, and only users on the permissions list can view and interact with it.
3.2. Adjusting repository visibility by using the API Copy linkLink copied to clipboard!
To control who can pull or interact with a repository, you can set its visibility to public or private by using the Red Hat Quay API.
The visibility of your repository can be set to private or public by using the POST /api/v1/repository/{repository}/changevisibility command.
Prerequisites
- You have Created an OAuth access token.
- You have created a repository.
Procedure
You can change the visibility of your repository to public or private by specifying the desired option in the
visibilityschema. For example:$ curl -X POST \ -H "Authorization: Bearer <bearer_token>" \ -H "Content-Type: application/json" \ -d '{ "visibility": "private" }' \ "https://quay-server.example.com/api/v1/repository/my_namespace/test_repo_three/changevisibility"Example output
{"success": true}