{"record":{"id":"f32cc3fa558bf1d4","repo":"jesseduffield/lazygit","slug":"unsupported-git-service","errorCode":null,"errorMessage":"Unsupported git service","messagePattern":"Unsupported git service","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/commands/hosting_service/hosting_service.go","lineNumber":144,"sourceCode":"\t}\n\n\treturn &Service{\n\t\trepoURL:           repoURL,\n\t\trepoName:          repoName,\n\t\tServiceDefinition: serviceDomain.serviceDefinition,\n\t}, nil\n}\n\nfunc (self *HostingServiceMgr) getServiceDomain(repoURL string) (*ServiceDomain, error) {\n\tcandidateServiceDomains := self.getCandidateServiceDomains()\n\n\tfor _, serviceDomain := range candidateServiceDomains {\n\t\tif strings.Contains(repoURL, serviceDomain.gitDomain) {\n\t\t\treturn &serviceDomain, nil\n\t\t}\n\t}\n\n\treturn nil, errors.New(self.tr.UnsupportedGitService)\n}\n\nfunc (self *HostingServiceMgr) getCandidateServiceDomains() []ServiceDomain {\n\tserviceDefinitionByProvider := map[string]ServiceDefinition{}\n\tfor _, serviceDefinition := range serviceDefinitions {\n\t\tserviceDefinitionByProvider[serviceDefinition.provider] = serviceDefinition\n\t}\n\n\tserviceDomains := slices.Clone(defaultServiceDomains)\n\n\tfor gitDomain, typeAndDomain := range self.configServiceDomains {\n\t\tprovider, webDomain, success := strings.Cut(typeAndDomain, \":\")\n\n\t\t// we allow for one ':' for specifying the TCP port\n\t\tif !success || strings.Count(webDomain, \":\") > 1 {\n\t\t\tself.log.Errorf(\"Unexpected format for git service: '%s'. Expected something like 'github.com:github.com'\", typeAndDomain)\n\t\t\tcontinue\n\t\t}","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/jesseduffield/lazygit/blob/c477a2959b229fbf3284be0d4d2904ab61ec3c94/pkg/commands/hosting_service/hosting_service.go#L126-L162","documentation":"HostingServiceMgr.getServiceDomain matches the repo URL against candidate service domains (defaults like github.com, plus user-configured `services` entries) by substring Contains. If none match, it returns UnsupportedGitService: lazygit cannot tell which hosting service (github/gitlab/gitea/...) provides the web API for PRs/issues.","triggerScenarios":"Remotes on self-hosted GitLab/Gitea/Bitbucket with custom domains not present in config services; SSH remotes with an alias host from ~/.ssh/config; short/rewrite URLs that don't contain the real domain.","commonSituations":"Corporate self-hosted git servers; users whose origin is `git@mycompany-git:group/repo.git` (ssh alias); trying the create-PR flow on a plain local repo with no remote.","solutions":["Add the domain to lazygit config: `services: \\\"mygit.example.com:gitlab:mygit.example.com\\\"` (gitDomain:webDomain format is `<provider>:<webDomain>` under the remote's host)","Or fix the remote URL to the real domain: `git remote set-url origin git@mygit.example.com:group/repo.git`","Check `git remote -v` — the URL string literally must contain a known domain"],"exampleFix":"# before\n$ git remote -v\norigin  git@corp-git:team/repo.git   # ssh alias, no match -> error\n\n# after\n# ~/.config/lazygit/config.yml\nservices:\n  \"corp-git\": \"gitlab:corp-git.example.com\"\n# and/or fix the remote:\ngit remote set-url origin git@corp-git.example.com:team/repo.git","handlingStrategy":"validation","validationCode":"remoteUrl, _ := cmd.New([]string{\"git\", \"remote\", \"get-url\", \"origin\"}).RunWithOutput()\nknown := []string{\"github.com\", \"gitlab.com\", \"bitbucket.org\" /* + configured domains */}\nmatched := slices.ContainsFunc(known, func(d string) bool { return strings.Contains(remoteUrl, d) })\nif !matched {\n    return fmt.Errorf(\"no hosting service for %s; add a services entry\", remoteUrl)\n}","typeGuard":null,"tryCatchPattern":"Pre-resolve the remote URL and check it against known domains before invoking hosting-service features; on UnsupportedGitService, prompt the user for a `services:` config entry rather than failing silently.","preventionTips":["Add self-hosted domains under `services:` in lazygit config","Use real domains (not ssh aliases) in remote URLs","Remember matching is plain substring Contains — URLs must literally contain the domain"],"tags":["hosting-service","config","remote-url","self-hosted"],"backgroundTag":null,"analyzedSha":"c477a2959b229fbf3284be0d4d2904ab61ec3c94","analyzedAt":"2026-08-15T08:34:32.451Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}