feat: enhance Git 1Password integration with debugging commands and common issue guidance
This commit is contained in:
@@ -114,8 +114,31 @@ op signin
|
||||
```bash
|
||||
# Test the credential helper directly
|
||||
echo -e "protocol=https\nhost=github.com\n" | ~/.dotfiles/scripts/git-credential-1password.sh get
|
||||
|
||||
# Debug: List all 1Password items to see what's available
|
||||
op item list --format=json | jq -r '.[] | "\(.title) - \(.id)"'
|
||||
|
||||
# Debug: See the structure of a specific item
|
||||
op item get "YOUR_ITEM_ID" --format=json | jq
|
||||
|
||||
# Debug: Check what fields are available in an item
|
||||
op item get "YOUR_ITEM_ID" --format=json | jq -r '.fields[] | "\(.label // .id): \(.value // "empty")"'
|
||||
```
|
||||
|
||||
### Common Issues
|
||||
|
||||
**jq null matching errors:**
|
||||
|
||||
- This happens when 1Password items have missing fields
|
||||
- The updated script handles null values gracefully
|
||||
- Make sure your items have proper username and password fields
|
||||
|
||||
**Field naming issues:**
|
||||
|
||||
- The script looks for fields with labels containing: "username", "user", "login"
|
||||
- For passwords, it looks for: "password", "token", "secret", "pass"
|
||||
- If your fields have different names, rename them in 1Password
|
||||
|
||||
## Security Benefits
|
||||
|
||||
- Credentials are never stored in plain text on disk
|
||||
|
||||
Reference in New Issue
Block a user