Skip to content

project create fails when only STACKIT_ACCESS_TOKEN is set #1478

Description

@philross

Description

When using STACKIT_ACCESS_TOKEN in container environments, certain CLI commands (e.g. project create) fail despite the token being valid.

Steps to reproduce

  1. Set STACKIT_ACCESS_TOKEN as an environment variable with a valid token
  2. Pass this token to a container, where the stackit-cli ist installed, but not configured otherwise.
  3. Run stackit project create --parent-id xxxx --name my-project

Actual behavior

The command fails with:
Error: build project creation request: get authentication flow: read from keyring: exec: "dbus-launch": executable file not found in $PATH, read from encoded file as fallback: value not found

Even though STACKIT_ACCESS_TOKEN is set and API calls to other endpoints work fine.

Expected behavior

When STACKIT_ACCESS_TOKEN is set, all cli command should be possible.

Environment

  • OS: alpine:3.24.0
  • Version of STACKIT CLI (see stackit --version): 0.63.0

Additional information

After looking into it, I saw that project create additionally calls auth.GetAuthFlow() directly in buildRequest() to determine the owner email for the project membership payload. Seems that GetAuthFlow() is not aware of STACKIT_ACCESS_TOKEN and always reads auth_flow_type exclusively from the auth storage backend (keyring or fallback file).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions