Skip to content

auth login reports success but subsequent commands fail with 'No credentials provided' / credentials decrypt error #27

@jpoehnelt-bot

Description

@jpoehnelt-bot

Summary

After successful gws auth login (with status: success and credentials saved), subsequent API commands fail with:

{
  "code": 401,
  "message": "Access denied. No credentials provided. Run `gws auth login` or set GOOGLE_WORKSPACE_CLI_CREDENTIALS_FILE to an OAuth credentials JSON file.",
  "reason": "authError"
}

gws auth status then shows:

  • encrypted_credentials_exists: true
  • encryption_valid: false
  • encryption_error: "Could not decrypt. May have been created on a different machine."

This occurred on the same machine/session immediately after successful login.

Repro

  1. Configure client_secret.json
  2. Run:
    gws auth logout
    gws auth login
  3. Complete OAuth browser flow; CLI returns success JSON.
  4. Run:
    gws gmail users messages list --params '{"userId":"me","maxResults":1}'

Actual

  • auth login claims success.
  • next command cannot use credentials (No credentials provided).
  • status reports encrypted creds cannot be decrypted.

Expected

  • successful login should produce usable credentials for subsequent commands.

Notes

This looks like a storage/keyring mismatch in encrypted credential handling (or fallback key handling), not an OAuth consent failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions