problem: Unable to import a GitLab project that does not have a repository #12440

Open
opened 2026-05-06 18:36:29 +02:00 by mlncn · 3 comments
mlncn commented 2026-05-06 18:36:29 +02:00 (Migrated from codeberg.org)

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:

Migrating from https://gitlab.com/agaric/internal failed.

migration failed: Clone: exit status 128 - remote: You are not allowed to download code from this project. fatal: unable to access 'https://gitlab.com/agaric/internal.git/': The requested URL returned error: 403

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-settings

This 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

### 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: > Migrating from https://gitlab.com/agaric/internal failed. > > migration failed: Clone: exit status 128 - remote: You are not allowed to download code from this project. fatal: unable to access 'https://gitlab.com/agaric/internal.git/': The requested URL returned error: 403 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-settings` This 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*
Gusted commented 2026-05-06 18:43:49 +02:00 (Migrated from codeberg.org)

@mlncn wrote in https://codeberg.org/forgejo/forgejo/issues/12440#issue-4892090:

: You are not allowed to download code from this project

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.

@mlncn wrote in https://codeberg.org/forgejo/forgejo/issues/12440#issue-4892090: > : You are not allowed to download code from this project 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.
mlncn commented 2026-05-06 18:47:52 +02:00 (Migrated from codeberg.org)

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.

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.
mlncn commented 2026-05-06 22:17:55 +02:00 (Migrated from codeberg.org)

@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.

@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.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sleepy/forgejo#12440
No description provided.