{"_id":"590a04f3ed80861900cbc759","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","__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"},"project":"55b2d5baa74a380d00e290c4","parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-10-19T04:19:48.127Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"If your repository lives in Bitbucket, you can [connect your repository automatically](doc:signing-up-with-bitbucket), 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-bitbucket#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-bitbucket#section-step-2-add-the-ssh-key-to-your-bitbucket-account\\\">Step 2: Add the SSH Key to Your Bitbucket Account</a>\"\n}\n[/block]\n## Step 1: Enter the SSH Git Clone URL\n\nHead over to Bitbucket and find the repository you would like to connect with buddybuild. Within the main page of that repository, look to the top-right for **HTTPS URL.** Click on the HTTPS dropdown menu and select **SSH**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/683b744-Bitbucket_-Richie_-_8_-_bk-select-ssh.png\",\n        \"Bitbucket -Richie - 8 - bk-select-ssh.png\",\n        3000,\n        1138,\n        \"#e5e5e5\"\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/b7dcc5f-Bitbucket_-Richie_-_2_-_bk-copy-clone-url.png\",\n        \"Bitbucket -Richie - 2 - bk-copy-clone-url.png\",\n        3000,\n        978,\n        \"#dce0e4\"\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/978d61f-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/dc096fb-Bitbucket_-_SSH_-_3.png\",\n        \"Bitbucket - SSH - 3.png\",\n        1500,\n        765,\n        \"#4f6272\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n## Step 2: Add the SSH Key to Your Bitbucket Account\n\nHighlight and copy the generated SSH key.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/3e38b17-Bitbucket_-_SSH_-_4.png\",\n        \"Bitbucket - SSH - 4.png\",\n        1500,\n        765,\n        \"#4f6372\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nNavigate to your Bitbucket 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/bad4a51-Bitbucket_-Richie_-_9_-_bk-settings.png\",\n        \"Bitbucket -Richie - 9 - bk-settings.png\",\n        3000,\n        1138,\n        \"#e2e1e0\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nSelect **SSH keys.** \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/82b79a4-Bitbucket_-Richie_-_7_-_bk-select-ssh-keys.png\",\n        \"Bitbucket -Richie - 7 - bk-select-ssh-keys.png\",\n        3000,\n        1138,\n        \"#e5e5e6\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nNext, select **Add key.** \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/fbc61cb-Bitbucket_-Richie_-_1_-_bk-add-key.png\",\n        \"Bitbucket -Richie - 1 - bk-add-key.png\",\n        3000,\n        978,\n        \"#e1e1e2\"\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/1f77770-Bitbucket_-Richie_-_5_-_bk-paste-key.png\",\n        \"Bitbucket -Richie - 5 - bk-paste-key.png\",\n        3000,\n        1600,\n        \"#e7e9ea\"\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/7b0c7c6-Bitbucket_-Richie_-_5a_-_bk-paste-key-add-button.png\",\n        \"Bitbucket -Richie - 5a - bk-paste-key-add-button.png\",\n        3000,\n        1544,\n        \"#898c8e\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Private git submodules and private cocoapods\",\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}\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/7e6d526-Bitbucket_-_SSH_-_10.png\",\n        \"Bitbucket - SSH - 10.png\",\n        1500,\n        765,\n        \"#d1d1d2\"\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-bitbucket","type":"basic","title":"Adding a Bitbucket Repository"}

Adding a Bitbucket Repository


If your repository lives in Bitbucket, you can [connect your repository automatically](doc:signing-up-with-bitbucket), 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-bitbucket#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-bitbucket#section-step-2-add-the-ssh-key-to-your-bitbucket-account\">Step 2: Add the SSH Key to Your Bitbucket Account</a>" } [/block] ## Step 1: Enter the SSH Git Clone URL Head over to Bitbucket and find the repository you would like to connect with buddybuild. Within the main page of that repository, look to the top-right for **HTTPS URL.** Click on the HTTPS dropdown menu and select **SSH**. [block:image] { "images": [ { "image": [ "https://files.readme.io/683b744-Bitbucket_-Richie_-_8_-_bk-select-ssh.png", "Bitbucket -Richie - 8 - bk-select-ssh.png", 3000, 1138, "#e5e5e5" ], "sizing": "full" } ] } [/block] Highlight and copy the **SSH URL.** [block:image] { "images": [ { "image": [ "https://files.readme.io/b7dcc5f-Bitbucket_-Richie_-_2_-_bk-copy-clone-url.png", "Bitbucket -Richie - 2 - bk-copy-clone-url.png", 3000, 978, "#dce0e4" ], "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/978d61f-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/dc096fb-Bitbucket_-_SSH_-_3.png", "Bitbucket - SSH - 3.png", 1500, 765, "#4f6272" ], "sizing": "full" } ] } [/block] ## Step 2: Add the SSH Key to Your Bitbucket Account Highlight and copy the generated SSH key. [block:image] { "images": [ { "image": [ "https://files.readme.io/3e38b17-Bitbucket_-_SSH_-_4.png", "Bitbucket - SSH - 4.png", 1500, 765, "#4f6372" ], "sizing": "full" } ] } [/block] Navigate to your Bitbucket Account by first selecting your account photo, and then selecting **Settings.** [block:image] { "images": [ { "image": [ "https://files.readme.io/bad4a51-Bitbucket_-Richie_-_9_-_bk-settings.png", "Bitbucket -Richie - 9 - bk-settings.png", 3000, 1138, "#e2e1e0" ], "sizing": "full" } ] } [/block] Select **SSH keys.** [block:image] { "images": [ { "image": [ "https://files.readme.io/82b79a4-Bitbucket_-Richie_-_7_-_bk-select-ssh-keys.png", "Bitbucket -Richie - 7 - bk-select-ssh-keys.png", 3000, 1138, "#e5e5e6" ], "sizing": "full" } ] } [/block] Next, select **Add key.** [block:image] { "images": [ { "image": [ "https://files.readme.io/fbc61cb-Bitbucket_-Richie_-_1_-_bk-add-key.png", "Bitbucket -Richie - 1 - bk-add-key.png", 3000, 978, "#e1e1e2" ], "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/1f77770-Bitbucket_-Richie_-_5_-_bk-paste-key.png", "Bitbucket -Richie - 5 - bk-paste-key.png", 3000, 1600, "#e7e9ea" ], "sizing": "full" } ] } [/block] Next, click **Add key**. [block:image] { "images": [ { "image": [ "https://files.readme.io/7b0c7c6-Bitbucket_-Richie_-_5a_-_bk-paste-key-add-button.png", "Bitbucket -Richie - 5a - bk-paste-key-add-button.png", 3000, 1544, "#898c8e" ], "sizing": "full" } ] } [/block] [block:callout] { "type": "warning", "title": "Private git submodules and private cocoapods", "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." } [/block] Navigate back to buddybuild and click on the **Build** button. [block:image] { "images": [ { "image": [ "https://files.readme.io/7e6d526-Bitbucket_-_SSH_-_10.png", "Bitbucket - SSH - 10.png", 1500, 765, "#d1d1d2" ], "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.