-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[Gitlab to Gitea] Pull requests import is okay, but pull/heads points to invalid objects leads to no new branch or PR #15155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Added a link to try.gitea.io https://try.gitea.io/99rgosse/gitlab_to_gitea/pulls/1 |
Hello- Any updates on this issue? I have a similar issue. I have imported a repo from Gitlab to Gitea version 1.13.7 not all but some closed merge request in Gitlab does not get transferred over to Gitea. While trying to create a new branch from master I get the |
As the noob I am, I began looking at the migration commands, and I think this is manageable with some "tricks and extra commands", like importing the lonely commits and attaching them to branches made only for the occasion. |
On last version gitea 1.14.4 we have this issue on importing repositories from Gitlab with pull requests. If we using import without pull requests, it fine, all repositories worked as expected. But if we enable import Pull Request, repository is unuseble, creating new branch ended with errors. |
In fact the import process cannot invent branches and commits that are not here anymore. To do this, Gitea needs to know what must be displayed when you successfully merge, and when you make an import maybe replay some parts needed. |
Notabene : the Error 500 is not anymore on the latest gitea versions... |
With "gitea/gitea:1.15.2" I got the same issue. `2021/09/09 23:19:28 ...ers/web/repo/pull.go:1113:CompareAndPullRequestPost() [E] NewPullRequest: Unable to fetch origin base branch [group1/repo1:master -> base, original_base in tmpBasePath]: exit status 1
2021/09/09 23:19:28 Completed POST /group1/repo1/compare/master...feature/test1 500 Internal Server Error in 141.856947ms` |
If you remove the heads (or as I did, point them to old commit), it will work again, the PR will be accessible in Gitea (but the calculation still won't work for these old ones) |
Hello everyone
I began migrating repositories from my self hosted Gitlab, and every features work great, thanks !
The only downside is when I migrate the Pull Requests, I can access commits only on open PR, the closed Pull Requests don’t have any commits within (see screenshot)
Also when trying to access files, I got an error 500.
If the PR is still open, everything work as intended.
Please let me know if there is anything I can do for help, and thanks for the great work !
Gitea version (or commit ref): tried on Gitea 1.13.4 and 1.15.0+Dev
Git version:
Gitlab Version : EE 13.9.4 and CE 12.8.0
Operating system:
Ubuntu-bionic 18.04.5 LTS under Vagrant+VirtualBox
Database (use
[x]
):Can you reproduce the bug at https://try.gitea.io:
Log gist:
when clicking on page:
routers/repo/pull.go:659:ViewPullFiles() [E] GetCommit: object does not exist [id: , rel_path: ]
when importing:
error: refs/pull/1488/head does not point to a valid object!
error: refs/pull/1507/head does not point to a valid object!
2021/03/25 14:36:24 ...es/pull/temp_repo.go:104:createTemporaryRepo() [E] Unable to fetch origin base branch [gitrepo/repo3:repo4/master -> base, original_base in /data/gitea/tmp/local-repo/pull.git082213367]: exit status 1: error: refs/pull/1538/head does not point to a valid object! error: refs/pull/1544/head does not point to a valid object! error: refs/pull/1545/head does not point to a valid object! error: refs/pull/1546/head does not point to a valid object! error: refs/pull/1551/head does not point to a valid object! error: refs/pull/1560/head does not point to a valid object! fatal: bad object .alternate error: /data/git/repositories/gitrepo/repo3.git did not send all necessary objects
Description
Gitea service is directly accessible from within my intranet, linked to port 3000.
When trying a migration from gitlab to gitea, the PR are imported but of course deleted branches can't
14:35:59 Started GET /user/task/11?_csrf=
Screenshots
The text was updated successfully, but these errors were encountered: