feat(git): treat altssh.gitlab.com as official GitLab.com SSH alias
What does this MR do?
Fixes remote resolution for users whose ~/.ssh/config uses GitLab.com's documented alternative SSH port endpoint:
Host gitlab.com
Hostname altssh.gitlab.com
Port 443With this configuration, commands like glab mr create failed with:
none of the git remotes configured for this repository point to a known GitLab host.
Configured remotes: altssh.gitlab.comThe SSH config translator (internal/git/ssh_config.go) rewrote gitlab.com remotes to altssh.gitlab.com, which is not a known/authenticated host. A special case already existed for ssh.gitlab.com; this MR extends it to cover both official GitLab.com SSH aliases.
How to test
- Add the altssh block above to
~/.ssh/config. - In a repository with an SSH remote for gitlab.com, run
glab mr create(or any command that resolves remotes). - Without this change it fails with the unknown-host error; with it, remotes resolve to
gitlab.com.