problem: Unable to import a GitLab project that does not have a repository #12440
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Does your problem still exist on the latest Forgejo version?
Yes, the problem still exists (tested locally with the latest development version)
About your usage of Forgejo
We are using Forgejo for our web development collective and the projects of many of our clients.
Problem description
Our 'internal' project on GitLab, where we have an extensive wiki and issue queue, cannot migrate to Forgejo. It attempts and then gets this error:
I am pretty sure it is because it does not have a repository.
If Forgejo cannot detect when a GitLab project does not have a repository, there should be an option to not try to import the repository, but still migrate in issues and wiki.
Potential workarounds
The workaround is actually pretty easy:
On your GitLab project, under General Settings, Visibility, project features, permissions enable Repository on for example
gitlab.com/example-organization/example-project/edit#js-general-project-settingsThis can be disabled again after migration is complete.
Forgejo Version
Forgejo Version: 15.0.1
Other details about your environment (software names and versions)
Linux git 6.1.0-45-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.170-1 (2026-04-30) x86_64
Solutions
Accepted solutions to address this problem will go here
@mlncn wrote in https://codeberg.org/forgejo/forgejo/issues/12440#issue-4892090:
Is a interesting string to be returned, does not entirely suggest to me a repository could not be found... but that you weren't allowed to access it.
As updated above, a workaround is simply to enable the repository on the GitLab side. In our case there happened to be a single over 8 year old file in the repository from before we turned it off. I am not sure what would have happened if repository was allowed (so would not 403) but there was truly nothing there (maybe 404?). But it probably would have worked— the migration actually failed again, this time a 403 on releases, which i had told Forgejo to migrate but also was not enabled; enabling Releases on GitLab and pressing Retry got the migration to go again and work!
Forgejo should more gracefully handle "things that don't exist / deny access" during a migration— perhaps have a "Skip this aspect of the project" rather than only a retry or cancel.
@Gusted yeah, i tried with all permissions even though i'd already given all read permissions, but after i figured out after initially posting, this is the message Forgejo gives in response to the 403 it must get when it has full access to the GitLab project but the GitLab project has the repository disabled.