Title: Allow login on headless systems · Issue #1190 · stackitcloud/stackit-cli · GitHub
Open Graph Title: Allow login on headless systems · Issue #1190 · stackitcloud/stackit-cli
X Title: Allow login on headless systems · Issue #1190 · stackitcloud/stackit-cli
Description: Problem description The CLI login command won't work at a (Linux) system without a running graphical window system. Typical examples are servers or jumphosts: $ ./stackit auth login Error: authorization failed: open browser to URL https:...
Open Graph Description: Problem description The CLI login command won't work at a (Linux) system without a running graphical window system. Typical examples are servers or jumphosts: $ ./stackit auth login Error: authoriz...
X Description: Problem description The CLI login command won't work at a (Linux) system without a running graphical window system. Typical examples are servers or jumphosts: $ ./stackit auth login Error: auth...
Opengraph URL: https://github.com/stackitcloud/stackit-cli/issues/1190
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow login on headless systems","articleBody":"## Problem description\n\nThe CLI login command won't work at a (Linux) system without a running graphical window system. Typical examples are servers or jumphosts:\n\n```\n$ ./stackit auth login\nError: authorization failed: open browser to URL https://accounts.stackit.cloud/oauth/v2/authorize?client_id=stackit-cli-0000-0000-000000000001\u0026code_challenge=dPQm6Vpnqnu8w6u-c3ieLizxbiJI8hGIPxYo65TX3jQ\u0026code_challenge_method=S256\u0026redirect_uri=http%3A%2F%2Flocalhost%3A8000\u0026response_type=code\u0026scope=openid+offline_access+email: exec: \"xdg-open\": executable file not found in $PATH\n```\n\nThis is frustrating, you need to have an X11 environment in order to use a CLI tool.\n\n## Proposed solution\n\nPrint a URL which a user can visit on a system with a browser where he can manually read off and manually feed back a key back to the stackit-cli. In principle this is already how the challenge works today, as calling the URL above redirects to http://localhost:8000/?code=TheChallengeCode... but there is no way to feed back this code into the CLI.\n\nA suggested API could be: `stackit auth login-headless` which emits the URL and waits for input.(STACKIT) Cloud Foundry, or in particular the `cf` CLI, has exactly this workflow:\n\n```\n% cf login -a https://api.system.01.cf.eu01.stackit.cloud --sso\nAPI endpoint: https://api.system.01.cf.eu01.stackit.cloud\n\nTemporary Authentication Code ( Get one at https://login.system.01.cf.eu01.stackit.cloud/passcode ): \n```\n\nYou can then visit https://login.system.01.cf.eu01.stackit.cloud/passcode and put the code there.\n\n## Alternative solutions (optional)\n\nA service account is the only way right now.","author":{"url":"https://github.com/svenk","@type":"Person","name":"svenk"},"datePublished":"2025-12-17T21:08:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1190/stackit-cli/issues/1190"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c6fc58d5-2864-14e3-a6b5-0d0dcd58e56b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E88E:652D1:26B539A:34255EB:6981CAC9 |
| html-safe-nonce | d83325e40c6e751c52ac117c251d11c92cab9006f584d7919b149f8869fdc5a5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODhFOjY1MkQxOjI2QjUzOUE6MzQyNTVFQjo2OTgxQ0FDOSIsInZpc2l0b3JfaWQiOiIzMTE3NDQzMzQ3NzYxMDE4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b4ee2d555139b72e6b0d74faeece835d7af3a2630c8e960f4bd53a6c46903fea |
| hovercard-subject-tag | issue:3740485434 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/stackitcloud/stackit-cli/1190/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4257cd1809bc04b8730006fa326cd024dfa65ef61b4110e22cd3d5d979c0341a/stackitcloud/stackit-cli/issues/1190 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4257cd1809bc04b8730006fa326cd024dfa65ef61b4110e22cd3d5d979c0341a/stackitcloud/stackit-cli/issues/1190 |
| og:image:alt | Problem description The CLI login command won't work at a (Linux) system without a running graphical window system. Typical examples are servers or jumphosts: $ ./stackit auth login Error: authoriz... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | svenk |
| hostname | github.com |
| expected-hostname | github.com |
| None | 95dd6eb30a064b87bd2c653e622fe2eb6a2ec1d12751c5463c252220548e75a4 |
| turbo-cache-control | no-preview |
| go-import | github.com/stackitcloud/stackit-cli git https://github.com/stackitcloud/stackit-cli.git |
| octolytics-dimension-user_id | 55577607 |
| octolytics-dimension-user_login | stackitcloud |
| octolytics-dimension-repository_id | 699237555 |
| octolytics-dimension-repository_nwo | stackitcloud/stackit-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 699237555 |
| octolytics-dimension-repository_network_root_nwo | stackitcloud/stackit-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7f9fe298cbc605034955dde47054b68dbf531efd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width