65
votes

I am using redis and trying to open CLI of redis using this:

$redis-cli -h 127.0.0.1 -p 6379 -a mysupersecretpassword

and getting and error :

(error) NOAUTH Authentication required

why so ?

3
Are you using the correct password? What is your Redis and redis-cli versions? And I am I correct in assuming that the error is provided only after you actually try to type a command at the cli's prompt? - Itamar Haber
if I use $redis-cli -h 127.0.0.1 -p 6379 then if authenticate its working. And my redis version is 3.0.3 - keshaw
Is it possible that your super secret password is parsed by the shell, i.e. contains magic characters? - Itamar Haber

3 Answers

47
votes

My solution is put the password in single quotes like:

$redis-cli -h 127.0.0.1 -p 6379 -a 'thisizmy!PASS' 
20
votes

If you have a '$' in your password then it won't work. So set the password without the "$".

10
votes

If you have '$' in your password, make sure to enclose the password with single quotes. Then it will work.