Skip to content

Commit 46f7ba3

Browse files
zoekt-mirror-gerrit: Don't remove /a/ prefix from git clone URLs (#990)
The /a/ prefix is required for authenticated git operations in default Gerrit configurations. Gerrit's HttpScheme intentionally includes /a/ in clone URLs to trigger authentication. Removing it breaks instances using default config. The ServerInfo API already returns the correct URL format based on the instance's configuration, so we should use it as-is. Amp-Thread-ID: https://ampcode.com/threads/T-6944ab20-837d-4e78-a9ad-51083263baec Co-authored-by: Amp <[email protected]>
1 parent 7236a5d commit 46f7ba3

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

cmd/zoekt-mirror-gerrit/main.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,6 @@ func main() {
147147
projectURL = schemeInfo.URL
148148
if s == "http" && schemeInfo.IsAuthRequired {
149149
projectURL = addPassword(projectURL, rootURL.User)
150-
// remove "/a/" prefix needed for API call with basic auth but not with git command → cleaner repo name
151-
projectURL = strings.Replace(projectURL, "/a/${project}", "/${project}", 1)
152150
}
153151
break
154152
}

0 commit comments

Comments
 (0)