mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-08 14:12:37 +02:00
ssh clone from all except CodeCommit
This commit is contained in:
1 parent
babd3da49b
commit
9a88d1f9f7
20 files changed
+229
-105
No files matched your search
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user