How to integrate Buddy with a private Git repository
Every project in Buddy is based on a Git repository. You can choose between GitHub, Bitbucket and GitLab providers, or Buddy's fully-featured native hosting. But what if you host your code elsewhere or only want to add a single repository without giving access to your whole GitHub account? Does it mean you won't be able to take advantage of Buddy's awesome features?
Not at all.
All you need to do is to use the Private repository option. Configuration is simple:
- Paste the URL to the repository
- Select the authorization method
- Configure a web hook and add it to the repository
This article will walk you through the process step on an example of a single GitHub repo. Let's go!
Adding a project to Buddy
Let's begin with setting up a project in Buddy:
- Sign up to Buddy at https://buddy.works/.
- Create a new project and select Your Private Git Server as the provider.
- Enter the Name for your project and paste the Repository URL.
- Download or copy the SSH key – we'll need that for the next part.
- Click Create a new project when done. Creating a custom repository
Authorizing Buddy in GitHub
Configuring deploy keys
Now ne need to add a deploy key so that Buddy can pull your repository to ship code:
- Select the repository that you want to synchronize in your GitHub profile.
- Go to Settings → Deploy keys and click Add deploy key.
- Paste the key that you copied from Buddy and enter its details.
- Click Add key when done. Adding deploy keys
Configuring web hooks
The last part is adding a web hook that will trigger deployments and update the list of commits in Buddy on changes to your repo:
- Switch to Buddy and go to the Code tab.
- Click Refresh in the right column and copy the webhook. Refreshing the repository
- Switch back to GitHub, go to Settings → Webhooks and click Add webhook.
- Paste the webhook in the Payload URL and select Send me everything.
- Click Add webhook when done. Adding a webhook
That's it! You can use Buddy to automatically build, test and deploy code on every push to the selected branch in your private repo.
Customer Success Manager
With Buddy even the most complicated CI/CD workflows take minutes to create
Sign up for Buddy CI/CDStart a free trial
Trusted by customers from 170+ countries