-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Description
teamcity auth login fails with "Authentication failed: invalid or expired token" even though the token is valid. The same token works correctly with v0.7.2 and via direct curl calls to the API.
Steps to reproduce
- Install
teamcityCLI v0.8.2 (also reproduces on v0.8.0 and v0.8.1) - Generate a valid API token on TeamCity server
- Run
teamcity auth login -s https://<server> -t <token> --verbose
Observed behavior
Validating... [debug] > GET https://<server>/app/rest/users/current
[debug] > Accept: application/json
[debug] > Authorization: [REDACTED]
✗
Error: Authentication failed: invalid or expired token
The CLI reports the token as invalid and exits with code 1.
Expected behavior
Login should succeed — the token is valid.
Verification
The same token works fine with:
- v0.7.2:
teamcity auth loginsucceeds, prints✓ Logged in as <user> - curl:
curl -H "Authorization: Bearer <token>" https://<server>/app/rest/users/currentreturns HTTP 200 with valid user JSON
Verbose output from v0.7.2 with the same token and server shows the same GET /app/rest/users/current request returning HTTP 200, but v0.7.2 correctly parses the response while v0.8.x does not.
Environment
- OS: macOS (Apple Silicon)
- TeamCity server version: 2025.07
- CLI installed via:
brew install jetbrains/utils/teamcity
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels