Skip to content

Conversation

Arjun-Ingole
Copy link
Contributor

Running a backup to a GitLab destination sometimes failed with

{ name: [has already been taken], path: [has already been taken],
  project_namespace.name: [has already been taken] }

The error appears when the repository already exists in the target namespace. GetOrCreate() only searched with ListProjects(search=…).

Search may not return the project (e.g. the authenticated token isn’t a member, the result is paginated differently, or GitLab’s search API just misses it). Because we didn’t detect the existing repo we attempted to create it again and GitLab quite rightly rejected the request.

Signed-off-by: Arjun Ingole <arjuningole38@gmail.com>
@cooperspencer
Copy link
Owner

thanks a lot for that.

@cooperspencer cooperspencer merged commit 593c15a into cooperspencer:main Jul 2, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants