Automate configuration of debusine client
We should have a script setup-debusine-client
or similar that would simplify the creation of the initial configuration file for Debian developers (and other users).
It should:
- Stop if
~/.config/debusine/client/config.ini
already exists (or offer to replace it entirely?) - Ask for the debusine instance, defaulting to
debusine.debian.net
- Open the browser at
$DEBUSINE_URL/-/me/token/
and invite the user to create a token (suggest a name based on the hostname and the date?), and prompt the user to copy/paste it in standard input- The assumption here is that the user will be redirected to the login page if he is not authenticated and will get back to the right page after login. If that's not true we should fix it.
-
NOTE: The above is currently not possible because the real token URL is like /-/user/$USERNAME/token/, so that's why I wrote
/-/me/
as a possible smart redirect...
- Create a valid
~/.config/debusine/client/config.ini
- Run
debusine list-work-requets
- If it works, indicate success and finish.
- If it fails, display the error, offer to retry by submitting another token, or to remove the configuration file and abort.