Skip to content
Latchkey

Redis "WRONGPASS invalid username-password pair" in CI

Redis received an AUTH attempt but the password (or ACL user) is wrong, so it returns "WRONGPASS". The client did send credentials; they just do not match what the container was started with.

What this error means

AUTH or the first command fails with "WRONGPASS invalid username-password pair or user is disabled." while the connection itself works.

Terminal
(error) WRONGPASS invalid username-password pair or user is disabled.

Common causes

The client password differs from requirepass

The value in the connection URL does not match the --requirepass the container was launched with.

An ACL user name or password is wrong

On Redis 6+, connecting as a named ACL user with the wrong password (or a disabled user) yields WRONGPASS rather than NOAUTH.

How to fix it

Match the client URL to the container password

Use the same password on both sides.

.github/workflows/ci.yml
services:
  redis:
    image: redis:7
    options: >-
      --requirepass supersecret
      --health-cmd "redis-cli -a supersecret ping"
    ports: ['6379:6379']
env:
  REDIS_URL: redis://:supersecret@127.0.0.1:6379/0

Use the correct ACL username and password

If you use ACLs, include both the username and password in the URL.

Terminal
redis-cli -h 127.0.0.1 -p 6379 --user app --pass app_pw ping

How to prevent it

  • Define the Redis password once and reuse it in the URL and healthcheck.
  • Keep ACL user definitions and client credentials in sync.
  • Store the password as a CI secret, not inline in multiple places.

Frequently asked questions

What causes "Redis "WRONGPASS invalid username-password""?
The value in the connection URL does not match the --requirepass the container was launched with.
How do I fix Redis "WRONGPASS invalid username-password"?
Use the same password on both sides.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card