Closed h7su closed 7 months ago
Want to confirm:
now I try the no gogit version, it works good, no error.
So only gogit version has this issue. Thanks for your test.
When i use the 'import outside repo' function from top-right, I just check 'use it as a mirror' , not seen 'migrate the releases'.
OK
So, should this issue be treat as a bug?
Not sure. Maybe caused by some special tags in this repo, like https://github.com/go-gitea/gitea/issues/28843#issuecomment-1898213975
OK, I got it.
The reason is that the creator is empty in tag v2.6.13-rc3
The reason is that the creator is empty in tag
v2.6.13-rc3
So we have to use a ghost here if creator is empty.
Automatically locked because of our CONTRIBUTING guidelines
Description
create a mirror from linux kernel repo, it clone the repo to disk successful but prompt "panic: runtime error: slice bounds out of range [:-1]" on the web. then i use cmd: gitea.exe admin repo-sync-releases, it show below log:
2024/01/18 15:02:39 .../setting/security.go:168:loadSecurityFrom() [W] Enabling Query API Auth tokens is not recommended. DISABLE_QUERY_AUTH_TOKEN will default to true in gitea 1.23 and will be removed in gitea 1.24. panic: runtime error: slice bounds out of range [:-1]
goroutine 1 [running]: code.gitea.io/gitea/modules/git.newSignatureFromCommitline({0xc001ebacb8, 0x0, 0x20}) /source/modules/git/signature_gogit.go:37 +0x3fa code.gitea.io/gitea/modules/git.parseTagRef(0xc001ebafd8?) /source/modules/git/repo_tag.go:184 +0x22f code.gitea.io/gitea/modules/git.(Repository).GetTagInfos(0xc001cba1e0, 0x0, 0x3a071c5?) /source/modules/git/repo_tag.go:142 +0x7fc code.gitea.io/gitea/modules/repository.pullMirrorReleaseSync({0x4b4c9f0, 0xc000d4bcc0}, 0xc0020c6800, 0x27?) /source/modules/repository/repo.go:502 +0x114 code.gitea.io/gitea/modules/repository.SyncReleasesWithTags({0x4b4c9f0?, 0xc000d4bcc0}, 0xc0020c6800, 0xc001cba1e0) /source/modules/repository/repo.go:294 +0x18a code.gitea.io/gitea/cmd.runRepoSyncReleases(0xc00045d720?) /source/cmd/admin.go:392 +0x5ca code.gitea.io/gitea/cmd.prepareSubcommandWithConfig.prepareWorkPathAndCustomConf.func1(0x2f16c00?) /source/cmd/main.go:117 +0x1ec github.com/urfave/cli/v2.(Command).Run(0x2f16c00, 0xc000ebd380, {0xc0001260e0, 0x1, 0x1}) /go/pkg/mod/github.com/urfave/cli/v2@v2.25.7/command.go:274 +0x998 github.com/urfave/cli/v2.(Command).Run(0x2f18d00, 0xc000ebd080, {0xc0001eb200, 0x2, 0x2}) /go/pkg/mod/github.com/urfave/cli/v2@v2.25.7/command.go:267 +0xbe5 github.com/urfave/cli/v2.(Command).Run(0xc001bf78c0, 0xc000ebcdc0, {0xc000194140, 0x3, 0x4}) /go/pkg/mod/github.com/urfave/cli/v2@v2.25.7/command.go:267 +0xbe5 github.com/urfave/cli/v2.(App).RunContext(0xc0009683c0, {0x4b4c780?, 0x6960640}, {0xc000194140, 0x3, 0x4}) /go/pkg/mod/github.com/urfave/cli/v2@v2.25.7/app.go:332 +0x5b7 github.com/urfave/cli/v2.(App).Run(...) /go/pkg/mod/github.com/urfave/cli/v2@v2.25.7/app.go:309 code.gitea.io/gitea/cmd.RunMainApp(0xc0009683c0, {0xc000194140?, 0xc0020530e0?, 0x4a?}) /source/cmd/main.go:176 +0x39 main.main() /source/main.go:46 +0x79
Gitea Version
1.21.4
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
v1.21.4 is downloaded from github release,and used in win11x64
Database
SQLite