{"_id":"590a04f3ed80861900cbc75b","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"},"__v":0,"project":"55b2d5baa74a380d00e290c4","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","parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-10-19T05:04:33.599Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"If your repository lives in GitHub, you can [connect your repository automatically](doc:signing-up-with-github), 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-github#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-github#section-step-2-add-the-ssh-key-to-your-github-account\\\">Step 2: Add the SSH Key to Your GitHub Account</a>\"\n}\n[/block]\n## Step 1: Enter the SSH Git Clone URL\n\nWithin the main page of your repository, look for the green **Clone or Download** button and click it to reveal a dropdown window. Click on **Use SSH.**\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/UgsI2ndmR2aH5ky5G1OA_GitHub%20-%20SSH%20-%201.png\",\n        \"GitHub - SSH - 1.png\",\n        \"3000\",\n        \"1460\",\n        \"#4a8ba9\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nWith SSH selected, copy the SSH URL by clicking the **copy to clipboard** button.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/YzvRCcWSxCKV70afj0Ux_GitHub%20-%20SSH%20-%202.png\",\n        \"GitHub - SSH - 2.png\",\n        \"3000\",\n        \"1460\",\n        \"#4a8ba8\",\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/d2439f9-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/43faa25-GitHub_-_SSH_-_3.png\",\n        \"GitHub - SSH - 3.png\",\n        1500,\n        765,\n        \"#d2d2d3\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n## Step 2: Add the SSH Key to Your GitHub Account\n\nHighlight and copy the generated SSH key.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0d19209-GitHub_-_SSH_-_4.png\",\n        \"GitHub - SSH - 4.png\",\n        1500,\n        765,\n        \"#506373\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nNavigate to your GitHub Account by first selecting your account photo, and then selecting **Settings.**\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Vn2SNwVSQiFQKWRVHptw_SelectSSHRepo%20GitHub%205.png\",\n        \"SelectSSHRepo GitHub 5.png\",\n        \"3000\",\n        \"1460\",\n        \"#456490\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nIn the left navigation, select **SSH keys.** \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Akw7R5UjS4C3CTwsHbsS_SelectSSHRepo%20GitHub%206.png\",\n        \"SelectSSHRepo GitHub 6.png\",\n        \"3000\",\n        \"1460\",\n        \"#4f688a\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nNext, select **Add SSH key.** \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/RS112z0dRmKqWQHlOX4R_SelectSSHRepo%20GitHub%207.png\",\n        \"SelectSSHRepo GitHub 7.png\",\n        \"3000\",\n        \"770\",\n        \"#ec7454\",\n        \"\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nEnter **Buddybuild** as the title, and paste the copied SSH key into the **key** field.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/b91UUBtVQrSjJJOIvswa_SelectSSHRepo%20GitHub%208.png\",\n        \"SelectSSHRepo GitHub 8.png\",\n        \"3000\",\n        \"1568\",\n        \"#f76151\",\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/hnOfqsT4aEjtDloH9MAQ_SelectSSHRepo%20GitHub%209.png\",\n        \"SelectSSHRepo GitHub 9.png\",\n        \"3000\",\n        \"1264\",\n        \"#68b94c\",\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/7d37010-GitHub_-_SSH_-_10.png\",\n        \"GitHub - 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-github","type":"basic","title":"Adding a GitHub Repository"}

Adding a GitHub Repository


If your repository lives in GitHub, you can [connect your repository automatically](doc:signing-up-with-github), 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-github#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-github#section-step-2-add-the-ssh-key-to-your-github-account\">Step 2: Add the SSH Key to Your GitHub Account</a>" } [/block] ## Step 1: Enter the SSH Git Clone URL Within the main page of your repository, look for the green **Clone or Download** button and click it to reveal a dropdown window. Click on **Use SSH.** [block:image] { "images": [ { "image": [ "https://files.readme.io/UgsI2ndmR2aH5ky5G1OA_GitHub%20-%20SSH%20-%201.png", "GitHub - SSH - 1.png", "3000", "1460", "#4a8ba9", "" ], "sizing": "full" } ] } [/block] With SSH selected, copy the SSH URL by clicking the **copy to clipboard** button. [block:image] { "images": [ { "image": [ "https://files.readme.io/YzvRCcWSxCKV70afj0Ux_GitHub%20-%20SSH%20-%202.png", "GitHub - SSH - 2.png", "3000", "1460", "#4a8ba8", "" ], "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/d2439f9-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/43faa25-GitHub_-_SSH_-_3.png", "GitHub - SSH - 3.png", 1500, 765, "#d2d2d3" ], "sizing": "full" } ] } [/block] ## Step 2: Add the SSH Key to Your GitHub Account Highlight and copy the generated SSH key. [block:image] { "images": [ { "image": [ "https://files.readme.io/0d19209-GitHub_-_SSH_-_4.png", "GitHub - SSH - 4.png", 1500, 765, "#506373" ], "sizing": "full" } ] } [/block] Navigate to your GitHub Account by first selecting your account photo, and then selecting **Settings.** [block:image] { "images": [ { "image": [ "https://files.readme.io/Vn2SNwVSQiFQKWRVHptw_SelectSSHRepo%20GitHub%205.png", "SelectSSHRepo GitHub 5.png", "3000", "1460", "#456490", "" ], "sizing": "full" } ] } [/block] In the left navigation, select **SSH keys.** [block:image] { "images": [ { "image": [ "https://files.readme.io/Akw7R5UjS4C3CTwsHbsS_SelectSSHRepo%20GitHub%206.png", "SelectSSHRepo GitHub 6.png", "3000", "1460", "#4f688a", "" ], "sizing": "full" } ] } [/block] Next, select **Add SSH key.** [block:image] { "images": [ { "image": [ "https://files.readme.io/RS112z0dRmKqWQHlOX4R_SelectSSHRepo%20GitHub%207.png", "SelectSSHRepo GitHub 7.png", "3000", "770", "#ec7454", "" ], "sizing": "full" } ] } [/block] Enter **Buddybuild** as the title, and paste the copied SSH key into the **key** field. [block:image] { "images": [ { "image": [ "https://files.readme.io/b91UUBtVQrSjJJOIvswa_SelectSSHRepo%20GitHub%208.png", "SelectSSHRepo GitHub 8.png", "3000", "1568", "#f76151", "" ], "sizing": "full" } ] } [/block] Next, click **Add key.** [block:image] { "images": [ { "image": [ "https://files.readme.io/hnOfqsT4aEjtDloH9MAQ_SelectSSHRepo%20GitHub%209.png", "SelectSSHRepo GitHub 9.png", "3000", "1264", "#68b94c", "" ], "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/7d37010-GitHub_-_SSH_-_10.png", "GitHub - 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.