Skip to content
Latchkey

Redis "WRONGPASS invalid username-password pair" in CI

The client did authenticate, but the credentials were wrong: "WRONGPASS invalid username-password pair or user is disabled." The password sent by the client does not match the server requirepass, or the ACL user is disabled.

What this error means

Redis rejects AUTH with "WRONGPASS invalid username-password pair or user is disabled." The connection is refused after auth even though the host and port are correct.

redis-cli
(error) WRONGPASS invalid username-password pair or user is disabled.
# python:
redis.exceptions.AuthenticationError: WRONGPASS invalid username-password pair
or user is disabled.

Common causes

Client and service passwords drifted

The password in REDIS_PASSWORD used by the client differs from the --requirepass value on the service, often because one was updated and the other was not.

ACL user mismatch or disabled default user

With Redis ACLs, the default user may be disabled or a named user expected; sending the plain password against a disabled user yields WRONGPASS.

How to fix it

Use one source of truth for the password

  1. Reference the same secret in both the service --requirepass and the client URL.
  2. Avoid quoting or interpolation that mangles the value.
  3. Re-run and confirm AUTH succeeds with an authenticated PING.
.github/workflows/ci.yml
services:
  redis:
    image: redis:7
    options: --requirepass ${{ secrets.REDIS_PASSWORD }}
env:
  REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}

Match the ACL username when one is set

If the service defines an ACL user, include the username in the AUTH so the pair matches.

Terminal
redis-cli -h localhost -p 6379 --user appuser --pass "$REDIS_PASSWORD" ping

How to prevent it

  • Single-source the Redis password across service and client.
  • Keep ACL usernames explicit when the default user is disabled.
  • Test AUTH in a readiness step so drift fails fast.

Frequently asked questions

What causes ""WRONGPASS invalid username-password pair""?
The password in REDIS_PASSWORD used by the client differs from the --requirepass value on the service, often because one was updated and the other was not.
How do I fix "WRONGPASS invalid username-password pair"?
Use one source of truth for the password

Related guides

References

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