ssh clone from all except CodeCommit

This commit is contained in:
pomidorry committed 2026-06-09 00:12:31 +03:00
1 parent babd3da49b
commit 9a88d1f9f7
20 files changed
+229 -105

No files matched your search

+3 -4
View File
@@ -39,14 +39,13 @@ type GitlabDownloaderFactory struct{}
// New returns a Downloader related to this factory according MigrateOptions
func (f *GitlabDownloaderFactory) New(ctx context.Context, opts base.MigrateOptions) (base.Downloader, error) {
u, err := url.Parse(opts.CloneAddr)
info, err := parseServiceCloneURL(opts.CloneAddr)
if err != nil {
return nil, err
}
baseURL := u.Scheme + "://" + u.Host
repoNameSpace := strings.TrimPrefix(u.Path, "/")
repoNameSpace = strings.TrimSuffix(repoNameSpace, ".git")
baseURL := info.apiURL.String()
repoNameSpace := strings.TrimSuffix(info.repoPath, ".git")
log.Trace("Create gitlab downloader. BaseURL: %s RepoName: %s", baseURL, repoNameSpace)