|
|
@ -18,6 +18,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"
|
|
|
@ -215,6 +216,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 := cmd.
|
|
|
|
if err := cmd.
|
|
|
@ -222,6 +225,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 {
|
|
|
|