{"_id":"590a04f3ed80861900cbc75c","parentDoc":null,"version":{"_id":"590a04f2ed80861900cbc737","project":"55b2d5baa74a380d00e290c4","__v":4,"createdAt":"2017-05-03T16:27:30.085Z","releaseDate":"2017-05-03T16:27:30.085Z","categories":["590a04f3ed80861900cbc738","590a04f3ed80861900cbc739","590a04f3ed80861900cbc73a","590a04f3ed80861900cbc73b","590a04f3ed80861900cbc73c","590a04f3ed80861900cbc73d","590a04f3ed80861900cbc73e","590a04f3ed80861900cbc73f","590a04f3ed80861900cbc740","590a04f3ed80861900cbc741","590a04f3ed80861900cbc742","590a04f3ed80861900cbc743","590a04f3ed80861900cbc744","590a04f3ed80861900cbc745","590a04f3ed80861900cbc746","590a04f3ed80861900cbc747","590a04f3ed80861900cbc748","590a04f3ed80861900cbc749","590a04f3ed80861900cbc74a","590a04f3ed80861900cbc74b","590a04f3ed80861900cbc74c","590a04f3ed80861900cbc74d","59124949de13f61900336a7a","5914b04e7c2c552d008b7104","5914b47242c6a22300b9dc20"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"7.0.0","version":"7"},"user":"55b2d5626862a10d00887af9","project":"55b2d5baa74a380d00e290c4","__v":0,"category":{"_id":"590a04f3ed80861900cbc73d","__v":0,"project":"55b2d5baa74a380d00e290c4","version":"590a04f2ed80861900cbc737","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-10-19T17:56:21.504Z","from_sync":false,"order":5,"slug":"setting-up-a-repository","title":"Setting Up a Repository"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-10-19T04:31:52.879Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"If your repository lives in GitLab, you can [connect your repository automatically](http://docs.buddybuild.com/connect-with-privately-hosted-gitlab), or connect via SSH if you prefer.\n\nIf you prefer SSH, buddybuild will automatically generate a secure SSH key for you to install into your source control system. Buddybuild will use this key to clone your repository.\n\nLet's get started!\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Quick Links\",\n  \"body\": \"<a href=\\\"http://docs.buddybuild.com/docs/ssh-with-gitlab#section-step-1-enter-the-ssh-git-clone-url\\\">Step 1: Enter the SSH Git Clone URL</a>\\n<a href=\\\"http://docs.buddybuild.com/docs/ssh-with-gitlab#section-step-2-add-the-ssh-key-to-your-gitlab-account\\\">Step 2: Add the SSH Key to Your GitLab Account</a>\"\n}\n[/block]\n## Step 1: Enter the SSH Git Clone URL\n\nWithin the main page of your repository, look to the middle of the page for the **HTTPS/SSH dropdown**. Click it and select **SSH** (if it is not already selected).\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/laJzDFVUSkehMDHGq62B_Gitlab%20-%20SSH%20-%201.png\",\n        \"Gitlab - SSH - 1.png\",\n        \"3000\",\n        \"800\",\n        \"#ed5b27\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nHighlight and copy the **SSH URL**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ss92vsW4Q0yKrbtb1Ooe_Gitlab%20-%20SSH%20-%202.png\",\n        \"Gitlab - SSH - 2.png\",\n        \"3000\",\n        \"800\",\n        \"#ed5b27\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nHead over to dashboard, visit [Select source](https://dashboard.buddybuild.com/apps/wizard/build/select-source) and choose **SSH**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/718d8e5-First_Build_-_Select_Source_-_SSH.png\",\n        \"First Build - Select Source - SSH.png\",\n        1500,\n        800,\n        \"#d3d6d8\"\n      ]\n    }\n  ]\n}\n[/block]\nPaste the SSH URL you copied into the **Git clone URL** field.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0584f40-Gitlab_-_SSH_-_3.png\",\n        \"Gitlab - SSH - 3.png\",\n        1500,\n        765,\n        \"#384f5f\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n## Step 2: Add the SSH Key to Your GitLab Account\n\nHighlight and copy the generated SSH key.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/a0fd01c-Gitlab_-_SSH_-_4.png\",\n        \"Gitlab - SSH - 4.png\",\n        1500,\n        765,\n        \"#506373\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nNavigate to your Profile Settings by first selecting the **menu icon** in the top left corner.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/YtIXgPoMSOmBHrRA1URx_Gitlab%20-%20SSH%20-%205.png\",\n        \"Gitlab - SSH - 5.png\",\n        \"3000\",\n        \"1188\",\n        \"#ed581d\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nIn the menu that slides out, select **Profile Settings**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/YrhCCkmWTmuC9K3wIOGN_Gitlab%20-%20SSH%20-%206.png\",\n        \"Gitlab - SSH - 6.png\",\n        \"3000\",\n        \"1188\",\n        \"#3589bf\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nNext, select **SSH Keys.** \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/26u27Q3Q1CNf4tWSULIi_Gitlab%20-%20SSH%20-%207.png\",\n        \"Gitlab - SSH - 7.png\",\n        \"3000\",\n        \"590\",\n        \"#16329f\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nAdd a new SSH Key by pasting the copied SSH key into the **Key** field, and entering **Buddybuild** as the title.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/D5b7AhUmTWSMMZFFG1qT_SelectSSHRepo%20GitLab%209.png\",\n        \"SelectSSHRepo GitLab 9.png\",\n        \"3000\",\n        \"1180\",\n        \"#f45b4f\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nNext, click **Add Key.**\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/eFUfEwDuSIyJ8DHv8zVd_Gitlab%20-%20SSH%20-%2010.png\",\n        \"Gitlab - SSH - 10.png\",\n        \"3000\",\n        \"800\",\n        \"#328654\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"If your project depends on any code in other private git repos, the ssh key will need to be added to those repos as well.\",\n  \"title\": \"Private git submodules and private cocoapods\"\n}\n[/block]\nNavigate back to buddybuild and click on the **Build** button.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/721df3e-Gitlab_-_SSH_-_10.png\",\n        \"Gitlab - SSH - 10.png\",\n        1500,\n        765,\n        \"#384f5f\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nBuddybuild will checkout your project code and kick off a simulator build. The build should finish within a few seconds.\n\nThat's it. You're now connected to buddybuild. The next step is to [invite testers](doc:inviting-testers) to try out your App.","excerpt":"","slug":"ssh-with-gitlab","type":"basic","title":"Adding a GitLab Repository"}

Adding a GitLab Repository


If your repository lives in GitLab, you can [connect your repository automatically](http://docs.buddybuild.com/connect-with-privately-hosted-gitlab), or connect via SSH if you prefer. If you prefer SSH, buddybuild will automatically generate a secure SSH key for you to install into your source control system. Buddybuild will use this key to clone your repository. Let's get started! [block:callout] { "type": "info", "title": "Quick Links", "body": "<a href=\"http://docs.buddybuild.com/docs/ssh-with-gitlab#section-step-1-enter-the-ssh-git-clone-url\">Step 1: Enter the SSH Git Clone URL</a>\n<a href=\"http://docs.buddybuild.com/docs/ssh-with-gitlab#section-step-2-add-the-ssh-key-to-your-gitlab-account\">Step 2: Add the SSH Key to Your GitLab Account</a>" } [/block] ## Step 1: Enter the SSH Git Clone URL Within the main page of your repository, look to the middle of the page for the **HTTPS/SSH dropdown**. Click it and select **SSH** (if it is not already selected). [block:image] { "images": [ { "image": [ "https://files.readme.io/laJzDFVUSkehMDHGq62B_Gitlab%20-%20SSH%20-%201.png", "Gitlab - SSH - 1.png", "3000", "800", "#ed5b27", "" ], "sizing": "full" } ] } [/block] Highlight and copy the **SSH URL**. [block:image] { "images": [ { "image": [ "https://files.readme.io/ss92vsW4Q0yKrbtb1Ooe_Gitlab%20-%20SSH%20-%202.png", "Gitlab - SSH - 2.png", "3000", "800", "#ed5b27", "" ], "sizing": "full" } ] } [/block] Head over to dashboard, visit [Select source](https://dashboard.buddybuild.com/apps/wizard/build/select-source) and choose **SSH**. [block:image] { "images": [ { "image": [ "https://files.readme.io/718d8e5-First_Build_-_Select_Source_-_SSH.png", "First Build - Select Source - SSH.png", 1500, 800, "#d3d6d8" ] } ] } [/block] Paste the SSH URL you copied into the **Git clone URL** field. [block:image] { "images": [ { "image": [ "https://files.readme.io/0584f40-Gitlab_-_SSH_-_3.png", "Gitlab - SSH - 3.png", 1500, 765, "#384f5f" ], "sizing": "full" } ] } [/block] ## Step 2: Add the SSH Key to Your GitLab Account Highlight and copy the generated SSH key. [block:image] { "images": [ { "image": [ "https://files.readme.io/a0fd01c-Gitlab_-_SSH_-_4.png", "Gitlab - SSH - 4.png", 1500, 765, "#506373" ], "sizing": "full" } ] } [/block] Navigate to your Profile Settings by first selecting the **menu icon** in the top left corner. [block:image] { "images": [ { "image": [ "https://files.readme.io/YtIXgPoMSOmBHrRA1URx_Gitlab%20-%20SSH%20-%205.png", "Gitlab - SSH - 5.png", "3000", "1188", "#ed581d", "" ], "sizing": "full" } ] } [/block] In the menu that slides out, select **Profile Settings**. [block:image] { "images": [ { "image": [ "https://files.readme.io/YrhCCkmWTmuC9K3wIOGN_Gitlab%20-%20SSH%20-%206.png", "Gitlab - SSH - 6.png", "3000", "1188", "#3589bf", "" ], "sizing": "full" } ] } [/block] Next, select **SSH Keys.** [block:image] { "images": [ { "image": [ "https://files.readme.io/26u27Q3Q1CNf4tWSULIi_Gitlab%20-%20SSH%20-%207.png", "Gitlab - SSH - 7.png", "3000", "590", "#16329f", "" ], "sizing": "full" } ] } [/block] Add a new SSH Key by pasting the copied SSH key into the **Key** field, and entering **Buddybuild** as the title. [block:image] { "images": [ { "image": [ "https://files.readme.io/D5b7AhUmTWSMMZFFG1qT_SelectSSHRepo%20GitLab%209.png", "SelectSSHRepo GitLab 9.png", "3000", "1180", "#f45b4f", "" ], "sizing": "full" } ] } [/block] Next, click **Add Key.** [block:image] { "images": [ { "image": [ "https://files.readme.io/eFUfEwDuSIyJ8DHv8zVd_Gitlab%20-%20SSH%20-%2010.png", "Gitlab - SSH - 10.png", "3000", "800", "#328654", "" ], "sizing": "full" } ] } [/block] [block:callout] { "type": "warning", "body": "If your project depends on any code in other private git repos, the ssh key will need to be added to those repos as well.", "title": "Private git submodules and private cocoapods" } [/block] Navigate back to buddybuild and click on the **Build** button. [block:image] { "images": [ { "image": [ "https://files.readme.io/721df3e-Gitlab_-_SSH_-_10.png", "Gitlab - SSH - 10.png", 1500, 765, "#384f5f" ], "sizing": "full" } ] } [/block] Buddybuild will checkout your project code and kick off a simulator build. The build should finish within a few seconds. That's it. You're now connected to buddybuild. The next step is to [invite testers](doc:inviting-testers) to try out your App.