-
-
Notifications
You must be signed in to change notification settings - Fork 277
Open
Description
Bug Description
The clawdhub CLI fails to authenticate when using clawhub.ai as the registry URL because of a redirect to www.clawhub.ai that loses the Authorization header.
Steps to Reproduce
- Create an API token on clawhub.ai
- Run
clawdhub login --token <token> - Run
clawdhub whoami
Result: ✖ Unauthorized
Root Cause
# This fails (307 redirect loses auth header):
curl -H "Authorization: Bearer <token>" https://clawhub.ai/api/v1/whoami
# Returns: Redirecting... → 401 Unauthorized
# This works:
curl -H "Authorization: Bearer <token>" https://www.clawhub.ai/api/v1/whoami
# Returns: {"user":{"handle":"..."}}The redirect from clawhub.ai to www.clawhub.ai strips the Authorization header.
Workaround
Use --registry https://www.clawhub.ai flag:
clawdhub whoami --registry "https://www.clawhub.ai"
clawdhub publish . --registry "https://www.clawhub.ai"Or update ~/.config/clawdhub/config.json:
{
"registry": "https://www.clawhub.ai",
"token": "..."
}Suggested Fix
Either:
- Change default registry URL in CLI to
https://www.clawhub.ai - Or remove the redirect on the server side
- Or ensure the redirect preserves headers
Environment
- clawdhub CLI: v0.3.0
- Node.js: v24.12.0
- OS: Ubuntu (ARM64)
Traxmaxx
Metadata
Metadata
Assignees
Labels
No labels