{"_id":"590a04f3ed80861900cbc75d","user":"55b2d5626862a10d00887af9","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"},"__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"},"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-03-30T23:28:45.577Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":7,"body":"This page explains how to add a Gitolite hosted repository to buddybuild. Let's get started!\n\nFirstly, if your repository is hosted on a Gitolite server, then you will need to [sign in with an email account](http://docs.buddybuild.com/docs/logging-in-with-git-ssh).\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Quick Links\",\n  \"body\": \"[Step 1: Enter the SSH Gitolite clone URL](http://docs.buddybuild.com/docs/adding-a-gitolite-repository#section-step-1-enter-the-ssh-gitolite-clone-url)\\n[Step 2: Add a buddybuild user to Gitolite](http://docs.buddybuild.com/docs/adding-a-gitolite-repository#section-step-2-add-a-buddybuild-user-to-gitolite)\\n[Step 3: Grant buddybuild access to your Gitolite repository](http://docs.buddybuild.com/docs/adding-a-gitolite-repository#section-step-3-grant-buddybuild-access-to-your-gitolite-repository)\\n[Step 4: Build](http://docs.buddybuild.com/docs/adding-a-gitolite-repository#section-step-4-build)\"\n}\n[/block]\n## Step 1: Enter the SSH Gitolite clone URL\n\nList your repositories in Gitolite and note the repository name that you would like to add to buddybuild.\n```\n$ ssh git:::at:::my.company.com info\nhello richie, this is git@my.company.com running gitolite3 v3.6.5-4-g6ed0156 on git 2.8.0\n\n R W\tmy-ios-app\n R W\tmy-android-app\n```\nHead over to dashboard, visit [Select source](https://dashboard.buddybuild.com/apps/wizard/build/select-source) and choose **SSH**.\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/f498677-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]\nConstruct the Gitolite SSH clone URL using the username (typically `git` or `gitolite` for most Gitolite installations), hostname and repository name.\n```\ngit@my.company.com:my-ios-app\n```\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ef8bee2-Gitolite_-_SSH_-_1.png\",\n        \"Gitolite - SSH - 1.png\",\n        1500,\n        765,\n        \"#384f5f\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n## Step 2: Add a buddybuild user to Gitolite\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Only a Gitolite admin user can add new users\"\n}\n[/block]\nIn order to build your app on our fleet of build machines you will need to create a new user that is authorized to read from your Gitolite repository. When you enter the gitolite clone URL, buddybuild generates an SSH key-pair that securely identifies your account in buddybuild.\n\nHighlight and copy the generated public SSH key.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/581167c-Gitolite_-_SSH_-_2.png\",\n        \"Gitolite - SSH - 2.png\",\n        1500,\n        765,\n        \"#506373\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nTo add a new Gitolite user named `buddybuild`, paste the public SSH key into the file below, then commit and push the admin changes to your gitolite server.\n```\ngitolite-admin/keydir/buddybuild.pub\n```\n\n## Step 3: Grant buddybuild access to your Gitolite repository\nModify your `gitolite-admin/conf/gitolite.conf` to grant `buddybuild` read-only access to your repository.\n```\nrepo my-ios-app\n    R = buddybuild\n```\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Automatic buddybuild SDK installation requires read-write access\",\n  \"body\": \"\"\n}\n[/block]\nGranting buddybuild read-write access to your repository gives you the option of *automatically* installing the buddybuild SDK at a later point. To do this, modify your `gitolite-admin/conf/gitolite.conf` to grant `buddybuild` read-write access to your repository.\n```\nrepo my-ios-app\n    RW = buddybuild\n```\nThis is an optional step, since with read-only access you can still **manually** install the buddybuild SDK.\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"If your project depends on any code in other private git repositories, the buddybuild user will need to be added to those repositories as well.\",\n  \"title\": \"Private git submodules and private cocoapods\"\n}\n[/block]\n## Step 4: Build\nNow go back to buddybuild and click on the **Build** button. \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/62368f9-Gitolite_-_SSH_-_3.png\",\n        \"Gitolite - SSH - 3.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. That's it, you're now connected to buddybuild!\n\nThe next step is to [invite testers](doc:inviting-testers) to try out your app.","excerpt":"","slug":"adding-a-gitolite-repository","type":"basic","title":"Adding a Gitolite Repository"}

Adding a Gitolite Repository


This page explains how to add a Gitolite hosted repository to buddybuild. Let's get started! Firstly, if your repository is hosted on a Gitolite server, then you will need to [sign in with an email account](http://docs.buddybuild.com/docs/logging-in-with-git-ssh). [block:callout] { "type": "info", "title": "Quick Links", "body": "[Step 1: Enter the SSH Gitolite clone URL](http://docs.buddybuild.com/docs/adding-a-gitolite-repository#section-step-1-enter-the-ssh-gitolite-clone-url)\n[Step 2: Add a buddybuild user to Gitolite](http://docs.buddybuild.com/docs/adding-a-gitolite-repository#section-step-2-add-a-buddybuild-user-to-gitolite)\n[Step 3: Grant buddybuild access to your Gitolite repository](http://docs.buddybuild.com/docs/adding-a-gitolite-repository#section-step-3-grant-buddybuild-access-to-your-gitolite-repository)\n[Step 4: Build](http://docs.buddybuild.com/docs/adding-a-gitolite-repository#section-step-4-build)" } [/block] ## Step 1: Enter the SSH Gitolite clone URL List your repositories in Gitolite and note the repository name that you would like to add to buddybuild. ``` $ ssh git@my.company.com info hello richie, this is git@my.company.com running gitolite3 v3.6.5-4-g6ed0156 on git 2.8.0 R W my-ios-app R W my-android-app ``` 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/f498677-First_Build_-_Select_Source_-_SSH.png", "First Build - Select Source - SSH.png", 1500, 800, "#d3d6d8" ] } ] } [/block] Construct the Gitolite SSH clone URL using the username (typically `git` or `gitolite` for most Gitolite installations), hostname and repository name. ``` git@my.company.com:my-ios-app ``` [block:image] { "images": [ { "image": [ "https://files.readme.io/ef8bee2-Gitolite_-_SSH_-_1.png", "Gitolite - SSH - 1.png", 1500, 765, "#384f5f" ], "sizing": "full" } ] } [/block] ## Step 2: Add a buddybuild user to Gitolite [block:callout] { "type": "info", "title": "Only a Gitolite admin user can add new users" } [/block] In order to build your app on our fleet of build machines you will need to create a new user that is authorized to read from your Gitolite repository. When you enter the gitolite clone URL, buddybuild generates an SSH key-pair that securely identifies your account in buddybuild. Highlight and copy the generated public SSH key. [block:image] { "images": [ { "image": [ "https://files.readme.io/581167c-Gitolite_-_SSH_-_2.png", "Gitolite - SSH - 2.png", 1500, 765, "#506373" ], "sizing": "full" } ] } [/block] To add a new Gitolite user named `buddybuild`, paste the public SSH key into the file below, then commit and push the admin changes to your gitolite server. ``` gitolite-admin/keydir/buddybuild.pub ``` ## Step 3: Grant buddybuild access to your Gitolite repository Modify your `gitolite-admin/conf/gitolite.conf` to grant `buddybuild` read-only access to your repository. ``` repo my-ios-app R = buddybuild ``` [block:callout] { "type": "info", "title": "Automatic buddybuild SDK installation requires read-write access", "body": "" } [/block] Granting buddybuild read-write access to your repository gives you the option of *automatically* installing the buddybuild SDK at a later point. To do this, modify your `gitolite-admin/conf/gitolite.conf` to grant `buddybuild` read-write access to your repository. ``` repo my-ios-app RW = buddybuild ``` This is an optional step, since with read-only access you can still **manually** install the buddybuild SDK. [block:callout] { "type": "warning", "body": "If your project depends on any code in other private git repositories, the buddybuild user will need to be added to those repositories as well.", "title": "Private git submodules and private cocoapods" } [/block] ## Step 4: Build Now go back to buddybuild and click on the **Build** button. [block:image] { "images": [ { "image": [ "https://files.readme.io/62368f9-Gitolite_-_SSH_-_3.png", "Gitolite - SSH - 3.png", 1500, 765, "#384f5f" ], "sizing": "full" } ] } [/block] Buddybuild will checkout your project code and kick off a simulator build. That's it, you're now connected to buddybuild! The next step is to [invite testers](doc:inviting-testers) to try out your app.