{"id":236,"date":"2020-08-19T08:42:14","date_gmt":"2020-08-19T06:42:14","guid":{"rendered":"http:\/\/www.myblog.nguenkam.com\/?p=236"},"modified":"2020-08-19T09:25:12","modified_gmt":"2020-08-19T07:25:12","slug":"create-a-project-in-gitlab","status":"publish","type":"post","link":"https:\/\/nguenkam.com\/blog\/index.php\/2020\/08\/19\/create-a-project-in-gitlab\/","title":{"rendered":"Create a project in GitLab"},"content":{"rendered":"\n<p>To create a project in GitLab, we can proceed in two different way:  trough the Gitlab-web-plattform or throug the command line.  Let\u00b4s now see  clearly how. <\/p>\n\n\n\n<h3>Create a project in GitLab<\/h3>\n\n\n\n<p>To create a project in GitLab:<\/p>\n\n\n\n<ol><li>In your dashboard, click the green&nbsp;<strong>New project<\/strong>&nbsp;button or use the plus icon in the navigation bar. This opens the&nbsp;<strong>New project<\/strong>&nbsp;page.<\/li><li>On the&nbsp;<strong>New project<\/strong>&nbsp;page, choose if you want to:<ul><li>Create a&nbsp;<a href=\"https:\/\/docs.gitlab.com\/ee\/gitlab-basics\/create-project.html#blank-projects\">blank project<\/a>.<\/li><li>Create a project using with one of the available&nbsp;<a href=\"https:\/\/docs.gitlab.com\/ee\/gitlab-basics\/create-project.html#project-templates\">project templates<\/a>.<\/li><li><a href=\"https:\/\/docs.gitlab.com\/ee\/user\/project\/import\/index.html\">Import a project<\/a>&nbsp;from a different repository, if enabled on your GitLab instance. Contact your GitLab admin if this is unavailable.<\/li><li>Run&nbsp;<a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/ci_cd_for_external_repos\/index.html\">CI\/CD pipelines for external repositories<\/a>.&nbsp;<a target=\"_blank\" href=\"https:\/\/about.gitlab.com\/pricing\/\" rel=\"noreferrer noopener\"><\/a><\/li><\/ul><\/li><\/ol>\n\n\n\n<h3>Push to create a new project<\/h3>\n\n\n\n<p><a href=\"https:\/\/gitlab.com\/gitlab-org\/gitlab-foss\/-\/issues\/26388\">Introduced<\/a>&nbsp;in GitLab 10.5.<\/p>\n\n\n\n<p>When you create a new repository locally, instead of going to GitLab to manually create a new project and then&nbsp;<a href=\"https:\/\/docs.gitlab.com\/ee\/gitlab-basics\/start-using-git.html#clone-a-repository\">clone the repo<\/a>&nbsp;locally, you can directly push it to GitLab to create the new project, all without leaving your terminal. If you have access rights to the associated namespace, GitLab will automatically create a new project under that GitLab namespace with its visibility set to Private by default (you can later change it in the&nbsp;<a href=\"https:\/\/docs.gitlab.com\/ee\/public_access\/public_access.html#how-to-change-project-visibility\">project\u2019s settings<\/a>).<\/p>\n\n\n\n<p>This can be done by using either SSH or HTTPS:<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container\">\n<div class=\"wp-block-group alignwide\"><div class=\"wp-block-group__inner-container\">\n<pre class=\"wp-block-code\"><code>## Git push using SSH\ngit push --set-upstream git@gitlab.example.com:namespace\/nonexistent-project.git master\n\n## Git push using HTTPS\ngit push --set-upstream https:\/\/gitlab.example.com\/namespace\/nonexistent-project.git master\n<\/code><\/pre>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<p>Once the push finishes successfully, a remote message will indicate the command to set the remote and the URL to the new project:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>remote:\nremote: The private project namespace\/nonexistent-project was created.\nremote:\nremote: To configure the remote, run:\nremote:   git remote add origin https:\/\/gitlab.example.com\/namespace\/nonexistent-project.git\nremote:\nremote: To view the project, visit:\nremote:   https:\/\/gitlab.example.com\/namespace\/nonexistent-project\nremote:<\/code><\/pre>\n\n\n\n<h4>Reference: <\/h4>\n\n\n\n<p><a href=\"https:\/\/docs.gitlab.com\/\">https:\/\/docs.gitlab.com\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To create a project in GitLab, we can proceed in two different way: trough the Gitlab-web-plattform or throug the command line. Let\u00b4s now see clearly how. Create a project in GitLab To create a project in GitLab: In your dashboard, click the green&nbsp;New project&nbsp;button or use the plus icon in the navigation bar. This opens [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":237,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[33,31],"tags":[34,36,35],"_links":{"self":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/236"}],"collection":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=236"}],"version-history":[{"count":3,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/236\/revisions"}],"predecessor-version":[{"id":247,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/236\/revisions\/247"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/media\/237"}],"wp:attachment":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}