Improve the non-interactive login/config in CI
Problem to solve
Scripting with glab and self-hosted instance of gitlab is very frustrating. I know there are multiple issues from users struggling with the setup. I am one them. Sorry if this is badly specified. I just feel that when running glab with interactive login, using the tool is quite easy. Not so much otherwise. There are multiple issue I have run into when trying to run glab from a script.
This may be solvable by documentation. But I also feel there are many improvements possible to the non-interactive experience.
Further details
An example of my current troubles:
This is using the gitlab/glab container image.
I login using token. The CI_SERVER_HOST is the standard gitlab CI_ env var. glab thus default to HTTPS. But glab repo clone defaults to SSH which is not configured. Also the auth login command doesn't read the GITLAB_HOST env var.
I was not able to find details on how to configure all of the options without running the interactive setup.
Proposal
Make glab
consume pre-defined CI variables so it can easily be using on a CI runner. For example CI_SERVER_HOST could be used as GITLAB_HOST.