gitkraken / gk-cli

GitKraken CLI Releases and Documentation
https://www.gitkraken.com
Other
122 stars 48 forks source link

[FEAT] Add docs explaining how to log into gk on a terminal-only system #39

Closed Dev-iL closed 5 months ago

Dev-iL commented 6 months ago

Is your feature request related to a problem? Please describe. There's no documented way to log in to gk on a terminal-only system (i.e. that has no browser).

Describe the solution you'd like I'd like the documentation of the gk login command to include instructions on how to log in to gk using the terminal, and possibly another system where a token can be obtained using a browser.

Describe alternatives you've considered Disassembling the executable to find the flags of the gk login command.

Additional context On a terminal only system, calling gk login fails silently with no comment/warning/error.

Dev-iL commented 6 months ago

If anybody else has this problem, here's the workaround I found:

  1. On a computer with a browser download the gk executable and run gk login to completion, where completion looks like this:

    image

  2. Verify using gk user-info that you are logged in and your organization is set correctly.

  3. Locate the .gitkraken folder (on Windows this is inside ...AppData\Roaming, on linux it's ~/.gitkraken)

  4. Copy the files gk_config.yaml and <token>.cli.ftl to the .gitkraken folder on the target machine. ( <token> is what appears for you after logging in through the browser.)

And you're done! gk should now be logged in on the target machine.

jkelroy commented 5 months ago

Hello @Dev-iL, in the latest version we implemented gk login -u for logging in without the need for a browser. https://gitkraken.github.io/gk-cli/docs/gk_login.html