|
|
@ -19,6 +19,7 @@ import ( |
|
|
|
"code.gitea.io/gitea/modules/log" |
|
|
|
"code.gitea.io/gitea/modules/log" |
|
|
|
"code.gitea.io/gitea/modules/notification" |
|
|
|
"code.gitea.io/gitea/modules/notification" |
|
|
|
"code.gitea.io/gitea/modules/process" |
|
|
|
"code.gitea.io/gitea/modules/process" |
|
|
|
|
|
|
|
"code.gitea.io/gitea/modules/proxy" |
|
|
|
repo_module "code.gitea.io/gitea/modules/repository" |
|
|
|
repo_module "code.gitea.io/gitea/modules/repository" |
|
|
|
"code.gitea.io/gitea/modules/setting" |
|
|
|
"code.gitea.io/gitea/modules/setting" |
|
|
|
"code.gitea.io/gitea/modules/timeutil" |
|
|
|
"code.gitea.io/gitea/modules/timeutil" |
|
|
@ -216,6 +217,8 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo |
|
|
|
return nil, false |
|
|
|
return nil, false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
envs := proxy.EnvWithProxy(remoteURL.URL) |
|
|
|
|
|
|
|
|
|
|
|
stdoutBuilder := strings.Builder{} |
|
|
|
stdoutBuilder := strings.Builder{} |
|
|
|
stderrBuilder := strings.Builder{} |
|
|
|
stderrBuilder := strings.Builder{} |
|
|
|
if err := git.NewCommand(ctx, gitArgs...). |
|
|
|
if err := git.NewCommand(ctx, gitArgs...). |
|
|
@ -223,6 +226,7 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo |
|
|
|
Run(&git.RunOpts{ |
|
|
|
Run(&git.RunOpts{ |
|
|
|
Timeout: timeout, |
|
|
|
Timeout: timeout, |
|
|
|
Dir: repoPath, |
|
|
|
Dir: repoPath, |
|
|
|
|
|
|
|
Env: envs, |
|
|
|
Stdout: &stdoutBuilder, |
|
|
|
Stdout: &stdoutBuilder, |
|
|
|
Stderr: &stderrBuilder, |
|
|
|
Stderr: &stderrBuilder, |
|
|
|
}); err != nil { |
|
|
|
}); err != nil { |
|
|
|