GitHub is a social coding platform used by software developers and companies all around the world. GitHub profiles generally include the individual's name, company, location and sometimes the profile owner's email address.
GitHub is a great place to find leads for software development or engineering. In this blog post we will show you how to find the email address for most GitHub profiles (even if they don't publicly share their email).
Find a user's GitHub email address
Locate a GitHub user profile
GitHub features an advanced search you can use to find user profiles. The "User options" section of the advanced search enables you to search for profiles based on location, name, followers, etc. It's not within the scope of this blog post to go in depth on the different search techniques for GitHub. Maybe in another post!
For the sake of this guide we will use a well known person to demonstrate how to find a user's email address. We will use Linus Torvald's profile.
Linus is a well known software developer and at the time of writing this blog post his GitHub profile does not include his email. However, we can still find his email address. There are three basic tseps to find almost any GitHub user's email address.
Step 1: Locate a non-forked repository
The first step is to locate a non-forked repository. A forked repository is a repository that has been copied from someone else's GitHub account and in most cases will not contain the target user's commits (and therefore not helpful for us). You can tell if a repository is a fork because it will be prefixed with "Forked from".
If the user has a non-forked repository there's a good chance you will be able to find their email address. Once you find a promising repository click on the name to be taken to the repository view. For this guide, we will be using Linus' "test-tlib" repository.
Step 2: Find a commit by the user
Within the repository view you can see a "commits" link on the left hand side of the page. The image below points it out. The more commits there are, the more likely it is to find a commit by the user. In this case we see 11 commits. All we need is to find a single commit by the target user to find their email address. Click on the commits link to be taken to a commit history view.
When viewing the commit history your goal is to find one or more commits created by the target GitHub user. In our example, we are looking for commits by Linus (his GitHub user name is torvalds).
Once you locate a promising commit click on the commit ID on the right hand side to view the actual commit.
Step 3: Convert to the patch view to locate the email address
The commit view is not very interesting to us, however this is where the real trick comes in. What you want to do next is look at the URL in your browser navigation bar. Add ".patch" to the end of the URL as demonstrated below, and then hit "enter" to load the patch view.
Once the patch view loads you need to examine the commit info to the find the target author. All authors have a name and email address. Locate the user's email address!
Note, GitHub has a privacy option to enable masking user emails. Some users enable that privacy option. In that case, you will notice an email that looks something like this: firstname.lastname@example.org. In that case you should ignore the email (maybe try an older repository).
With the trick outlined in this blog post you can find most email addresses on GitHub as long as the person has a commit history. GitHub is a powerful source for leads and shouldn't be missed! Add the technique from this blog post to your tool belt, it will come in handy more often than you think!
If you don't like the manual nature of this trick and find it too time consuming you can always give Nymeria a shot! Nymeria automates this entire procss on GitHub and supports other websites such as LinkedIn.