Skip to content

How to create a project by importing it from another GitLab instance (it's private) #2524

Answered by nejch
w7089 asked this question in Q&A
Discussion options

You must be logged in to vote

@w7089 it doesn't seem like the GitLab API supports supplying this as extra arguments, so python-gitlab won't be able to do it at the moment. You'd have to request this upstream at GitLab first. See available parameters here https://docs.gitlab.com/ee/api/projects.html#create-project.

However, you could probably get around this by supplying auth via user:name@host, e.g. providing your import URL as https://user:[email protected]/repo.git. But please check if GitLab sanitizes the credentials after the project is created so you don't leak the password in your import_url later on.

Also, this is just a simple repository import. You could import a complete GitLab project using gitlab projec…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by w7089
Comment options

You must be logged in to vote
5 replies
@nejch
Comment options

@w7089
Comment options

@w7089
Comment options

@w7089
Comment options

@w7089
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants