Skip to content

Instantly share code, notes, and snippets.

@dmc5179
Last active February 5, 2026 01:29
Show Gist options
  • Select an option

  • Save dmc5179/604e6ce6ca7edee77ac87070141cfac6 to your computer and use it in GitHub Desktop.

Select an option

Save dmc5179/604e6ce6ca7edee77ac87070141cfac6 to your computer and use it in GitHub Desktop.
Process to change a user password or reset login count for the quay mirror registry

How to reset a user password or user login count for the quay mirror registry

Install required packages and modules

dnf install python3 python3-pip sqlite
sudo python3 -m pip install --upgrade pip
python3 -m pip install --user bcrypt

Generate a new password hash

python3 -c 'import bcrypt; print(bcrypt.hashpw(b"NEW-PASSWORD-HERE", bcrypt.gensalt(12)).decode("utf-8"))'

Stop the quay app

systemctl --user stop quay-app

Use podman unshare to access the DB file directly

podman unshare

Within the podman unshare shell, change directories to the location of the sqlite db file

cd /home/ec2-user/quay-install/sqlite-storage

sqlite3	quay_sqlite.db
sqlite3 /sqlite-storage/quay_sqlite.db
sqlite> UPDATE user SET password_hash = 'HASH_FROM_STEP_1' WHERE username = 'init';
sqlite> UPDATE user SET invalid_login_attempts = 0 WHERE username = 'init';
sqlite> quit

exit

Restart the quay app service

systemctl --user start quay-app

Adding a new user to the mirror registry and making them super user

Create new user

  • On the main quay web page click, create user, follow prompts
  • systemctl --user stop quay-app
  • modify the config.yaml and add the new user under the SUPER_USER section
  • save and exit config.yaml
  • systemctl --user start quay-app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment