diff --git a/models/repo_mirror.go b/models/repo_mirror.go index 6205ab3b2..cdc1f4d95 100644 --- a/models/repo_mirror.go +++ b/models/repo_mirror.go @@ -128,7 +128,7 @@ func (m *Mirror) SaveAddress(addr string) error { return err } - _, err = git.NewCommand("remote", "add", "origin", addr).RunInDir(repoPath) + _, err = git.NewCommand("remote", "add", "origin", "--mirror=fetch", addr).RunInDir(repoPath) return err }