when I use gitlab api to recreate a repository which is from another platform, gitlab says that this repository has been deleting, so it can not be imported to my gitlab, how to resolve this problem, thanks
but this repository not exists anymore in my gitlab server
What do you mean the repository is from another platform? GitLab mostly only supports one platform (Linux), and everything related to specific repositories should happen via either Git or HTTP(S), both being quite platform agnostic.
Maybe you should provide more details on what you’re actually trying and what happens. Screenshots could be helpful.
1.platform in my question means a code-platform like Github
2.I want to import a repository from github to gitlab which is named release-tools by using gitlab api and this repository(release-tools) has been deleted by using api, but the repository’s status is still deleting, so I can’t import the same name repository to my gitlab
I wish I have described clearly.
That’s a lot more clear!
I have only deleted a few projects from our self-hosted GitLab server, and never used the API for that, i.e. I’ve just done it through the web UI.
- Is this on a self-hosted instance or on gitlab.com?
- Can you find the project if you log in to the web UI? Does it say that deletion is pending? (In some cases, I don’t remember the details, deletions - perhaps it’s mostly of other objects - are delayed)
- Can you show the API requests and their output for both deleting and importing? (Remember to hide your token)
thanks for your reply!
- I only have to use api to do this because there are so many repositories needed to import to self-hosted gitlab.
2.the repository can not be found in web UI and there’s no more useful information about the repository
3.the api is Projects API | GitLab , when I call the api, the response like this “400 {‘message’: {‘base’: ['The item is still being deleted. Please try again later. ']}}”, even I do this through web UI.
I’ve also wrote scripts using the API for things I do a lot, so I fully understand wanting to use the API for something.
I’m puzzled! First you say that the repository can’t be found in the web UI, then you talk about doing something through the web UI.
I meant it when I asked you to show the requests and their output. The requests allow us to see if something is wrong/strange in them, causing the message. And you have not shown anything about the deletion request.
Maybe also produce a (partial) screenshot showing that the project can’t be found in the web UI.
I mean that I have tried two ways to import the same name repository to self-hosted gitlab(api and on the web page), but the response looks like the same one.
api returns 400 {‘message’: {‘base’: ['The item is still being deleted. Please try again later. ‘]}}’
web page shows
Then show us both requests, the fact that you have tried two ways indicate that you don’t know how such requests are supposed to look, so maybe…
And what about the request and response from the deletion? (If a deletion was actually scheduled/started last time, I know the response might be different this time)?
And make a larger screenshot (or perhaps two), where we can actually see the (relevant part of the) form.
I have tried some many times, but the result is still the same, the request and response from the deletion are as follows.
-
through web UI
-
using api
it is a longtime since the situation happened, the “release-tools” repository is still be deleted but the others are not like this
Hey, I have uploaded some larger pics, what is the next step or is there any suggestion for this problem? thanks a lot
I didn’t ask for larger pics. It would be much better to get screenshots in english (i.e. with an error message I can understand).
What is hiding between the censorship in the first line? I’m not sure what language that is, but it looks like python, based on my limited knowledge of that, my guess is that it’s the url of your instance (you should have some other means of defence on that so you don’t need to keep the url hidden), and a username+password, those are not needed (you have the token for giving access), try removing them to see if that makes a difference.
Why is a part of the url you want to import from hidden? Are there a username+password hidden there? If it’s public someone might try to import it on their instance to see if it’s possible.
And some other things that would be good:
- A screenshot showing the complete output (with headers from the server)
- Something showing the/a(n) (attempted) deletion.
(And if it isn’t clear: I’m not exclusively believing the reported error. The problem might be somewhere else in the process, and that error might be badly worded or just returned in error).