Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access redis with password? #338

Open
huiali opened this issue Jul 7, 2020 · 8 comments
Open

How to access redis with password? #338

huiali opened this issue Jul 7, 2020 · 8 comments

Comments

@huiali
Copy link

huiali commented Jul 7, 2020

How to access redis with password?

@robjtede
Copy link
Member

robjtede commented Jul 7, 2020

AFAIK you may be able to do this:

redis://HOST:PORT?db=0&password=PASSWORD

Source: https://metacpan.org/pod/URI::redis

@huiali
Copy link
Author

huiali commented Jul 8, 2020

@robjtede Thank you for your reply. I use Actix redis. No matter how much I try, I can't access redis with a password.

@shirshak55
Copy link
Contributor

shirshak55 commented Jul 12, 2020

Hmm can u test redis-cli ping and check if u receive pong? and try this redis-cli -h 127.0.0.1 -p 6379 -a 'password' and make sure ur password don't have some weirdness.

@huiali
Copy link
Author

huiali commented Jul 15, 2020

I can connect using the redis 0.16 package, but I can't connect with actix-redis no matter how it is set. Does actix-redis not support redis connection with password?
@shirshak55 @robjtede

@pymongo
Copy link
Contributor

pymongo commented Aug 2, 2020

Send 'AUTH' command to redis server after connect

    let redis = actix_redis::RedisActor::start("redis://localhost:6379");
    // or redis.send(...).await
    redis.do_send(actix_redis::Command(resp_array![
        "AUTH",
        "password"
    ]));

actix-redis use redis-async crate internal

how to connect redis with password #49 - redis-async-rs

@zhaoyii
Copy link

zhaoyii commented Feb 27, 2021

How to access redis with password?

I also want to know

@OriginalLight
Copy link

I hope to provide a more convenient way to manage the settings of password keys like SpringBoot to configure them in the .env file.

@robjtede
Copy link
Member

robjtede commented Mar 6, 2022

i expect actix/actix-extras#212 will help with this with the new redis-rs based session backend

@robjtede robjtede closed this as completed Mar 6, 2022
@robjtede robjtede reopened this Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants