58

I get the error:

(error) NOAUTH Authentication required.

When in redis-cli and trying to display the KEYS *. I've only set a requirepass not an auth afaiac. I'm in the redis.conf but do not know what to do.

Karl Morrison
  • 1,521
  • 4
  • 25
  • 42

7 Answers7

56
1. redis-cli
2. auth yourpassword
3. shutdown
4. sudo service redis_6379 start
Farid Movsumov
  • 669
  • 5
  • 4
37

Setting the requirepass configuration directive causes the server to require password authentication with the AUTH command before sending other commands. The redis.conf file states that clearly:

Require clients to issue AUTH before processing any other
commands. This might be useful in environments in which you do not trust
others with access to the host running redis-server.

Itamar Haber
  • 884
  • 8
  • 8
12

first run

redis-cli

then after the prompt run

127.0.0.1:6379> AUTH your_password

if all ok you get the OK

detzu
  • 231
  • 2
  • 3
6
  1. Make sure you have redis-cli installed.
  2. Just use following command.

    redis-cli -h host.domain.com -p port -a yourpassword

Kunal
  • 161
  • 1
  • 1
3

comment requirepass (line 480 mostly) in redis.conf file if uncommented.

  • 1
    Usually have a password for security, probably best to provide a solution than enables the ability to put in the password – Alex Stewart Apr 23 '20 at 07:48
0

NOAUTH requires to authenticate via AUTH method before executing any get/set/etc. call, in predis that can be done via the auth() method, for example:

    $predisClient->auth('username', 'password');
0

specific your redis password in the redis-cli command line eg:

redis-cli -h 127.0.0.1 -p 6379 -p "$your_password"

check your $your_password.

It's recommend to add double quote to the password on the command line.