Sometimes you’ll want to connect GitHub to other pieces of software that you use— anything from continuous integration servers that regularly run automated tests, to project management or bug tracking software.
There are three ways of connecting software to a GitHub repository. One option is the GitHub API. Go to developer.github.com
And click the API link at the top of the page to learn how to use the Git‐ Hub API to do pretty much anything with a repository automatically.
The API allows your developers to query and change almost anything they want with a repository, but sometimes they’ll want to just be notified when a specific action occurs.
For example, they might want their program to get notified every time some‐ one adds a new issue or pushes work up to GitHub.
If they want to have notifications automatically sent to their project, they should be using the Webhooks option that can be configured by going to Settings → Webhooks & Services, as shown in picture:-
Clicking the Add webhook button toward the top-right corner of the screen takes you to the “Add webhook” screen, as shown in picture.
This screen allows you to tell GitHub to send a notification to your custom software every time a particular type of event occurs.
You need to provide the URL that your software will be listening on, the kind of content you want delivered, an optional secret.(so that not just anyone can send fake information to that URL), and what kinds of events you’d like to have the software be notified about.
If your developers are implementing a custom integration, they’ll run you through exactly how they’d like to have the webhook(s) configured.
The final integration option is one that doesn’t require developers. Go to Settings → Webhooks & Services, and click the “Add service” link. A drop-down list will appear, similar to
If you’re using popular software with a prewritten integration, start typing the name of the software into the “Filter services” text box and fairly quickly you should see the name of the software.
Click the name to display a screen that tells you what you need to do to integrate with that software.
For example, let’s say you wanted to integrate with Basecamp. Start typing “Base‐ camp,” select Basecamp from the list, and you’ll see a screen like next picture asking you to enter the URL of your Basecamp project and the credentials that you want Git‐ Hub to use to log in.
Each integration is different—both in terms of what information you need to provide to connect to the third-party software and in terms of the functionality provided by the integration.
As you can see in next picture , the install notes for integrating with Asana are quite different than those for integrating with Basecamp.
“Deploy keys” is the last tab in the Settings section for a GitHub repository .
In addition to other people needing access to your repository, sometimes you’ll want to provide the ability for other software to connect to it.
For example, your develop‐ ment team will probably create an automated build system that will allow them to just click a button to deploy the latest changes from GitHub to your production server.
If they do that, the build system will need the ability to access the repository. There are a number of ways of providing that access.One option is to create a machine account. This is where you create a new GitHub user just for your build machine and add that user as a collaborator.
That’s a particularly good approach if your build sys‐ tem needs access to a number of different repositories. Another option is just to create a deploy key.
A deploy key is an SSH key (a Secure Shell key) that is created to allow a particular piece of software to access a single repository on GitHub.
Don’t worry about this too much, but if your development team asks you to set up a deploy key, just ask them to email you the public SSH key and to give you a name for the key (e.g., “build server”), and then you can use that information to fill out the “Add deploy key” .
If you like this post, don’t forget to share 🙂