Description
Description
When migrating a project including Wiki from a self-hosted GitLab instance the Wiki does not get migrated if GitLab does not use master
as the default branch name.
Project code will be migrated but Wiki will be empty.
The log shows the following error message:
gitea | 2024/01/31 15:54:13 ...s/repository/repo.go:104:MigrateRepositoryGitData() [W] Clone wiki: exit status 128 - fatal: Remote branch master not found in upstream origin
This is probably caused by hard-coded Branch: "master",
in MigrateRepositoryGitData
, line 102 - see
gitea/modules/repository/repo.go
Line 102 in 0b1a42c
Steps to reproduce
- Change default branch name of GitLab instance to
main
- this will result in both project repository and wiki repository to usemain
as default branch name - In gitea, start a migration from GitLab
- Select "Wiki"
- Click "Migrate repository"
Result
- Code repository is migrated
- Wiki repository is not migrated
Expected Result
both code repository and wiki repository should be migrated
Gitea Version
gitea:latest and gitea:nightly
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Git Version
2.43.0
Operating System
Linux
How are you running Gitea?
docker compose, following instructions here: https://docs.gitea.com/next/installation/install-with-docker#basics
Database
None