-
I'd like to create a new project by importing it from another GitLab instance using CLI (see screenshot from UI) where the source repository is private and requires authentication. I tried Is it supported? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
@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 Also, this is just a simple repository import. You could import a complete GitLab project using |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot, i succeeded to import using |
Beta Was this translation helpful? Give feedback.
@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 ashttps://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 yourimport_url
later on.Also, this is just a simple repository import. You could import a complete GitLab project using
gitlab projec…