Skip to content

"Unsupported git service" when trying to create a PR with custom SSH alias #5403

@cybermarco5

Description

@cybermarco5

Describe the bug

I use multiple SSH keys in my setup (work, personal, etc.). I configured custom SSH aliases for each account to ensure my commits and access to repos/organizations. This means i need to clone my repos using git@github-work:XXX and git@github-personal:XXX instead of git@github.com:XXX. I can push/pull, create branches, tags, and everything works fine.

However, when I try to open a branch in my browser or open a PR, I get the famous "Unsupported git service". I tried setting

services:
  "github-work": "github.com"

in my config file but have had no luck :(

To Reproduce

Steps to reproduce the behavior:

  1. Define multiple SSH profiles in you ~.config/ssh
  2. Clone a repo using one of the aliases you created
  3. Try opening a PR
  4. See error

Expected behavior

Lazygit should resolve the local url using the ssh alias (since that is how Git works). Or at least provide a way to set it up to mirror its behaviour.

Screenshots

Image

Version info:

commit=2d0c7cb0fc85e3c262837eb9691813fa97e00e80, build date=2024-09-07T02:26:26Z, build source=binaryRelease, version=0.44.0, os=darwin, arch=arm64, git version=2.43.0

Terminal info:

Ghostty + TMUX

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions