
NOTE: All of the Octokit.NET calls are awaitableĪuthentication can be achieved in a several ways via an implementation of `ICredentialStore` passed to a constructor of `GitHubClient`, by providing credentials to the `` property, or by using the `GitHubClient.Oauth`. The `OAuth` API allows an application to authenticate without ever having access to a user's credentials it is understandably a little more complex than approaches that just take credentials. However, you can only perform some read-only tasks on public repositories and, unless you are performing the most trivial of tasks, you will hit rate limits for unauthenticated access. You can create a client instance and just get stuck in, like this: var githubClient = new GitHubClient(new ProductHeaderValue("Tinkering")) Now, if you only want to read information about publicly accessible repositories, you do not need to provide any authentication at all.

According to the documentation, this information is used by GitHub for analytics purposes and can be whatever you want. All but one of the constructors take a `ProductHeaderValue` instance, which provides some basic information about the application that is accessing the API. The main `GitHubClient` class, used to access the GitHub APIs, has several constructors, some that take credentials (sort of) and some that do not. In addition, I have no intention of documenting every aspect of Octokit and the GitHub API, so if you are intrigued by anything that I do not discuss, I encourage you to explore the relevant documentation. This week, we will look at the first step authentication. I am using Octokit.NET for my hackery if you choose to use another variant of Octokit, some of the types and methods available may be different, but you should be able to follow along. Last week, I introduced Octokit and my plans to write a tool that will mine our GitHub repositories for information that can be used to craft release notes.
