Skip to content

Commit 7924d23

Browse files
committed
docs: add credential priority documentation and fix brew tap command
- Add credential hierarchy section to troubleshooting - Add credential priority to profile setup docs - Fix brew tap command to joshrotenberg/brew - Set mdbook fold level to 0 (closed by default) - Update DEMO.md profile commands to use --deployment flag
1 parent f548405 commit 7924d23

File tree

2 files changed

+51
-4
lines changed

2 files changed

+51
-4
lines changed

docs/src/reference/troubleshooting.md

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,57 @@ brew install ca-certificates
5858

5959
## Authentication Issues
6060

61+
### Credential Priority Hierarchy
62+
63+
**IMPORTANT:** redisctl uses credentials in this priority order (highest to lowest):
64+
65+
1. **Environment Variables** (highest priority)
66+
2. **Profile Configuration**
67+
3. **CLI Flags** (lowest priority)
68+
69+
This means environment variables will **override** your profile settings!
70+
71+
**Common Issue:** Profile credentials not being used
72+
73+
**Diagnosis:**
74+
```bash
75+
# Check for environment variables
76+
env | grep REDIS
77+
78+
# Run with verbose logging to see which credentials are used
79+
redisctl -vv cloud subscription list 2>&1 | grep -i "using.*credentials"
80+
```
81+
82+
**Solution:**
83+
```bash
84+
# Unset environment variables to use profile
85+
unset REDIS_CLOUD_API_KEY
86+
unset REDIS_CLOUD_SECRET_KEY
87+
unset REDIS_CLOUD_API_URL
88+
89+
# For Enterprise
90+
unset REDIS_ENTERPRISE_URL
91+
unset REDIS_ENTERPRISE_USER
92+
unset REDIS_ENTERPRISE_PASSWORD
93+
94+
# Verify profile is now used
95+
redisctl -vv cloud subscription list
96+
```
97+
6198
### Invalid Credentials
6299

63100
**Problem:** `401 Unauthorized` or `Authentication failed`
64101

65102
**Diagnosis:**
66103
```bash
67-
# Test credentials directly
68-
redisctl auth test --profile prod
69-
70-
# Check environment variables
104+
# Check environment variables first
71105
env | grep REDIS
72106

73107
# Verify profile configuration
74108
redisctl profile show prod
109+
110+
# Use verbose logging to see which credentials are being used
111+
redisctl -vv cloud account get 2>&1 | head -20
75112
```
76113

77114
**Solutions:**

docs/src/walkthrough/03-setup.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ redisctl profile set prod --deployment cloud \
7474
--use-keyring
7575
```
7676

77+
## Credential Priority
78+
79+
**IMPORTANT:** Credentials are used in this order (highest to lowest):
80+
81+
1. **Environment Variables** ← Will override profiles!
82+
2. **Profile Configuration**
83+
3. **CLI Flags**
84+
85+
If you have `REDIS_CLOUD_API_KEY` set in your environment, it will be used instead of your profile credentials. Use `unset REDIS_CLOUD_API_KEY` to use profile credentials.
86+
7787
## Docker Compose Demo
7888

7989
Try the complete Enterprise demo:

0 commit comments

Comments
 (0)