Closed
Description
- Create -> New Migration.
- Migration Type: This repository will be a mirror.
- Create wiki on the original repository.
- Sync from original repository to the mirror repository.
- Update "Clone From URL" from Repo -> Settings -> Mirror Settings.
- Click "Synchronize Now" button, there will be a failed message the gitea.log
Failed to update mirror repository wiki
- Gitea version (or commit ref): v1.12.1
- Git version: 2.24.3
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (provide example URL)
- No
- Not relevant
Description
It should update the wiki repository remote origin while update the repository mirror address.
Below is the source code of save mirror address, I think update the wiki repository remote origin is missing.
// SaveAddress writes new address to Git repository config.
func SaveAddress(m *models.Mirror, addr string) error {
repoPath := m.Repo.RepoPath()
// Remove old origin
_, err := git.NewCommand("remote", "rm", "origin").RunInDir(repoPath)
if err != nil && !strings.HasPrefix(err.Error(), "exit status 128 - fatal: No such remote ") {
return err
}
_, err = git.NewCommand("remote", "add", "origin", "--mirror=fetch", addr).RunInDir(repoPath)
return err
}
Metadata
Metadata
Assignees
Labels
No labels