Skip to content

Adds the -u <uri> option to redis-cli#3409

Closed
itamarhaber wants to merge 1 commit intoredis:unstablefrom
itamarhaber:cli-uri
Closed

Adds the -u <uri> option to redis-cli#3409
itamarhaber wants to merge 1 commit intoredis:unstablefrom
itamarhaber:cli-uri

Conversation

@itamarhaber
Copy link
Member

@itamarhaber itamarhaber commented Jul 23, 2016

Resolves #3399.

Adds the ability to connect to a Redis server with a URI as specified by the provisional specification.

If and when this PR is merged, redis/redis-doc#743 should also be considered for merging.

@itamarhaber itamarhaber changed the title Adds the -u <uri> option Adds the -u <uri> option to redis-cli Nov 18, 2016
@itamarhaber
Copy link
Member Author

@antirez how do you feel about merging this in v4 (and perhaps even in 3.2)?

@selfagency
Copy link

i am very disappointed that this has been sitting here for months because presently i have no way of executing commands on my server using the cli because it's configured with a username.

@badboy
Copy link
Contributor

badboy commented Jan 26, 2017

@selfagency While adding this seems worthwile, your complaint makes no sense given that Redis does not handle usernames at any point. All you would gain is to use an uri instead of -h host -a password

@selfagency
Copy link

@badboy to access a redis db with a username you pass the username in the uri: $user@$server:6379/$database.

@badboy
Copy link
Contributor

badboy commented Feb 10, 2017

But Redis itself has no concept of users.

@selfagency
Copy link

selfagency commented Feb 10, 2017

@badboy i don't understand how that's the case, because i use elasticache, which is AWS's redis server, and it has a username

@badboy
Copy link
Contributor

badboy commented Feb 10, 2017

@selfagency Then that is completely non-supported and even this PR here won't solve it (as it simpyl drops the username part from the URI)

@vincentwoo
Copy link

On heroku, you'll get a REDIS_URL like [email protected]:1234.

You can connect currently with redis-cli -h ec2-23-3445.compute.aws.com -p 1234 -a 48548458. The username part is the password.

@rogusdev
Copy link

Heroku is a significant enough provider at this point, and this is a convenient enough use case that adds little overhead into the executable, this seems very worthy of inclusion. 👍 The fact that user is dropped if provided is fine.

@antirez
Copy link
Contributor

antirez commented Nov 27, 2017

Thanks @itamarhaber ! Merged, sorry for the delay. I modified the commit message in order to reflect the subject of this PR. Your commit had an odd message, like if it was corrupted because of the '<>' chars or alike.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants