You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: GitLab repository lookup fails for SSH clone URLs, scheme-less URLs and paths ending in .git #41871
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Sign glab in to a self-hosted GitLab (git.example.com, set as glab's default host).
In T3 Code, start a new project from a repository, choose GitLab, and enter any of these forms for an existing project group/project:
[email protected]:group/project.git (the SSH clone URL GitLab shows in the Clone button)
git.example.com/group/project (URL without scheme)
group/project.git
Submit the lookup.
Expected behavior
All three are normalized to host git.example.com (where present) and path group/project, the same as https://git.example.com/group/project(.git) already is since #7849.
Actual behavior
"Repository lookup failed — Source control repository operation lookupRepository failed for gitlab: The source control operation could not be completed."
parseRepositoryLookup in packages/source-control-gitlab/src/server/GitLabCli.ts only splits the host and strips .git when the input matches ^https?://. Any other input is URL-encoded whole into glab api projects/<input>:
Suggested fix: also accept scp-style user@host:path, ssh:// and scheme-less host/path (when the first segment matches a glab-authenticated host), and strip a trailing .git in the bare-path branch too.
Related: #26606 (no host chosen for bare paths), #40608 / #22342 (the 404 is reported as "Merge request not found." and hidden behind a generic toast).
Impact
Major degradation or frequent failure
Version or commit
T3 Code desktop 0.1.11 (stable)
Environment
Linux (AppImage), glab 1.131.0, self-managed GitLab
Logs or stack traces
VcsProcessExitError: VCS process failed in GitLabCli.execute: glab (/home/<user>) exited with 1 - Merge request not found.
SourceControlProviderError: Source control provider gitlab failed in getRepositoryCloneUrls: GitLab CLI command failed.
Workaround
Enter group/project or the full https:// URL.
Activity