{"_id":"590a04f3ed80861900cbc755","category":{"_id":"590a04f3ed80861900cbc738","__v":0,"version":"590a04f2ed80861900cbc737","project":"55b2d5baa74a380d00e290c4","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-25T00:29:31.009Z","from_sync":false,"order":0,"slug":"quickstart","title":"Get Started"},"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,"user":"55b2d5626862a10d00887af9","parentDoc":null,"project":"55b2d5baa74a380d00e290c4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-12-01T08:55:25.162Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":7,"body":"Use this guide to connect any privately hosted GitLab instance with buddybuild. Buddybuild supports all [GitLab products](https://about.gitlab.com/products/) including *GitLab Hosted*, *Community Edition* and *Enterprise Edition*. If you are looking to connect with GitLab.com instead see [Signing up with GitLab](doc:signing-up-with-gitlab).\n\nConnecting with your GitLab instance grants buddybuild access to your repository so that it can build your app when you push code to your repository. Connecting also grants buddybuild API access to manage webhooks for you, generate commit status, enables the pull request flow, synchronizes access control for team management and more.\n\nEach member of your team that uses buddybuild should go through this guide to connect with their GitLab account. This is encouraged so that you can take advantage of team management features. \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Prerequisite\"\n}\n[/block]\nFirst make sure you have created an account with buddybuild by signing up with [GitHub](http://docs.buddybuild.com/docs/signing-up-with-github), [Bitbucket](http://docs.buddybuild.com/docs/signing-up-with-bitbucket), [GitLab](http://docs.buddybuild.com/docs/signing-up-with-gitlab) or by [email](http://docs.buddybuild.com/docs/signing-up-with-ssh#section-step-1-sign-up-with-email).\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Connect your GitLab account\"\n}\n[/block]\nTo connect your privately hosted GitLab instance follow this URL:\nhttps://dashboard.buddybuild.com/apps/wizard/build/select-repo/gitlab-enterprise\n\nYou will see a dialog with two input fields. If you already know your **GitLab instance endpoint** and have a **personal access token**, then enter those now. Otherwise, continue reading the next sections to learn how to get the endpoint name and generate a personal access token.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/e33d0bc-Gitlab_Enterprise-2.png\",\n        \"Gitlab Enterprise-2.png\",\n        1500,\n        877,\n        \"#2593d0\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Configure your GitLab Enterprise endpoint\"\n}\n[/block]\nYour GitLab endpoint is the hostname part of the URL when you visit your repositories in GitLab. Copy the hostname part of your GitLab server URL, which often looks something like `gitlab.mycompany.com`. If your server uses a non-default HTTPS port, then please also copy the port part of the URL. For example, `gitlab.mycompany.com:1234`.\n\n#### Do you have a private DNS?\nYour GitLab hostname must be publicly addressable on the internet. If you use private DNS for your GitLab installation, then you can use the IP address of the server instead.\n\n#### Do you have a firewall configured?\nIf your network infrastructure restricts inbound access over HTTPS from a set of IP addresses, then you may need to whitelist the IP addresses used by the buddybuild fleet. Please contact us for the latest CIDR range used by buddybuild.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Create a personal access token\"\n}\n[/block]\nNavigate to your GitLab instance and sign in with your individual account credentials. You do not need to sign in with a GitLab admin account.\n\nChoose **Settings** from the top right menu under your profile picture.  \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/d698de8-Gitlab_Enterprise-5.png\",\n        \"Gitlab Enterprise-5.png\",\n        1500,\n        646,\n        \"#eceded\"\n      ],\n      \"sizing\": \"full\",\n      \"caption\": \"\"\n    }\n  ]\n}\n[/block]\nYou will see a list of tabs at the top of the page. Click on **Access tokens**. Create a new token by entering **buddybuild** as the name, then clicking on **Create Personal Access Token**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/e4c19a7-Gitlab_Enterprise-6.png\",\n        \"Gitlab Enterprise-6.png\",\n        1500,\n        567,\n        \"#f1f1f1\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nCopy the new personal access token, a 20 character string with numbers and letters.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/7bc98f0-Gitlab_Enterprise-4.png\",\n        \"Gitlab Enterprise-4.png\",\n        1500,\n        415,\n        \"#e3e5e7\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nIn buddybuild, paste the personal access token into the **Enter your Access Token** field. Then click **Connect Your GitLab instance**.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/c6378d5-Gitlab_Enterprise-3.png\",\n        \"Gitlab Enterprise-3.png\",\n        1500,\n        877,\n        \"#2791cd\"\n      ],\n      \"sizing\": \"full\"\n    }\n  ]\n}\n[/block]\nThe dialog should close and display a list of your repositories. At this point you have successfully completed connecting buddybuild with your GitLab instance!","excerpt":"","slug":"connect-with-privately-hosted-gitlab","type":"basic","title":"Connect your privately-hosted GitLab instance"}

Connect your privately-hosted GitLab instance


Use this guide to connect any privately hosted GitLab instance with buddybuild. Buddybuild supports all [GitLab products](https://about.gitlab.com/products/) including *GitLab Hosted*, *Community Edition* and *Enterprise Edition*. If you are looking to connect with GitLab.com instead see [Signing up with GitLab](doc:signing-up-with-gitlab). Connecting with your GitLab instance grants buddybuild access to your repository so that it can build your app when you push code to your repository. Connecting also grants buddybuild API access to manage webhooks for you, generate commit status, enables the pull request flow, synchronizes access control for team management and more. Each member of your team that uses buddybuild should go through this guide to connect with their GitLab account. This is encouraged so that you can take advantage of team management features. [block:api-header] { "type": "basic", "title": "Prerequisite" } [/block] First make sure you have created an account with buddybuild by signing up with [GitHub](http://docs.buddybuild.com/docs/signing-up-with-github), [Bitbucket](http://docs.buddybuild.com/docs/signing-up-with-bitbucket), [GitLab](http://docs.buddybuild.com/docs/signing-up-with-gitlab) or by [email](http://docs.buddybuild.com/docs/signing-up-with-ssh#section-step-1-sign-up-with-email). [block:api-header] { "type": "basic", "title": "Connect your GitLab account" } [/block] To connect your privately hosted GitLab instance follow this URL: https://dashboard.buddybuild.com/apps/wizard/build/select-repo/gitlab-enterprise You will see a dialog with two input fields. If you already know your **GitLab instance endpoint** and have a **personal access token**, then enter those now. Otherwise, continue reading the next sections to learn how to get the endpoint name and generate a personal access token. [block:image] { "images": [ { "image": [ "https://files.readme.io/e33d0bc-Gitlab_Enterprise-2.png", "Gitlab Enterprise-2.png", 1500, 877, "#2593d0" ], "sizing": "full" } ] } [/block] [block:api-header] { "type": "basic", "title": "Configure your GitLab Enterprise endpoint" } [/block] Your GitLab endpoint is the hostname part of the URL when you visit your repositories in GitLab. Copy the hostname part of your GitLab server URL, which often looks something like `gitlab.mycompany.com`. If your server uses a non-default HTTPS port, then please also copy the port part of the URL. For example, `gitlab.mycompany.com:1234`. #### Do you have a private DNS? Your GitLab hostname must be publicly addressable on the internet. If you use private DNS for your GitLab installation, then you can use the IP address of the server instead. #### Do you have a firewall configured? If your network infrastructure restricts inbound access over HTTPS from a set of IP addresses, then you may need to whitelist the IP addresses used by the buddybuild fleet. Please contact us for the latest CIDR range used by buddybuild. [block:api-header] { "type": "basic", "title": "Create a personal access token" } [/block] Navigate to your GitLab instance and sign in with your individual account credentials. You do not need to sign in with a GitLab admin account. Choose **Settings** from the top right menu under your profile picture. [block:image] { "images": [ { "image": [ "https://files.readme.io/d698de8-Gitlab_Enterprise-5.png", "Gitlab Enterprise-5.png", 1500, 646, "#eceded" ], "sizing": "full", "caption": "" } ] } [/block] You will see a list of tabs at the top of the page. Click on **Access tokens**. Create a new token by entering **buddybuild** as the name, then clicking on **Create Personal Access Token**. [block:image] { "images": [ { "image": [ "https://files.readme.io/e4c19a7-Gitlab_Enterprise-6.png", "Gitlab Enterprise-6.png", 1500, 567, "#f1f1f1" ], "sizing": "full" } ] } [/block] Copy the new personal access token, a 20 character string with numbers and letters. [block:image] { "images": [ { "image": [ "https://files.readme.io/7bc98f0-Gitlab_Enterprise-4.png", "Gitlab Enterprise-4.png", 1500, 415, "#e3e5e7" ], "sizing": "full" } ] } [/block] In buddybuild, paste the personal access token into the **Enter your Access Token** field. Then click **Connect Your GitLab instance**. [block:image] { "images": [ { "image": [ "https://files.readme.io/c6378d5-Gitlab_Enterprise-3.png", "Gitlab Enterprise-3.png", 1500, 877, "#2791cd" ], "sizing": "full" } ] } [/block] The dialog should close and display a list of your repositories. At this point you have successfully completed connecting buddybuild with your GitLab instance!