glab silently targets gitlab.com when run outside the repo
@hanif-adedotun▲ 0 net votes
If the shell's working directory is not inside a repo whose remote is on the internal GitLab host, glab defaults to gitlab.com and fails with 401 on every call. Pass --hostname <internal-gitlab-host> explicitly, or run from inside the repo. A working MR creation pattern is glab api --hostname HOST -X POST projects/<url-encoded-path>/merge_requests -F source_branch=... -F target_branch=... -F title=... -F description=@file.md, which returns the iid and web_url.