Soenneker.GitHub.Client
4.0.2618
Prefix Reserved
dotnet add package Soenneker.GitHub.Client --version 4.0.2618
NuGet\Install-Package Soenneker.GitHub.Client -Version 4.0.2618
<PackageReference Include="Soenneker.GitHub.Client" Version="4.0.2618" />
<PackageVersion Include="Soenneker.GitHub.Client" Version="4.0.2618" />
<PackageReference Include="Soenneker.GitHub.Client" />
paket add Soenneker.GitHub.Client --version 4.0.2618
#r "nuget: Soenneker.GitHub.Client, 4.0.2618"
#:package Soenneker.GitHub.Client@4.0.2618
#addin nuget:?package=Soenneker.GitHub.Client&version=4.0.2618
#tool nuget:?package=Soenneker.GitHub.Client&version=4.0.2618
Soenneker.GitHub.Client
Provides cached Octokit GitHubClient instances with credentials isolated by token.
Installation
dotnet add package Soenneker.GitHub.Client
Configure and register
{
"GH": {
"Token": "your-github-token"
}
}
using Soenneker.GitHub.Client.Registrars;
services.AddGitHubClientUtilAsSingleton();
Keep the token in secret storage. Its repository and organization permissions determine what Octokit calls can do.
Use the configured client
using Soenneker.GitHub.Client.Abstract;
public sealed class RepositoryReader(IGitHubClientUtil clients)
{
public async Task<Repository> Get(
string owner,
string repository,
CancellationToken cancellationToken)
{
GitHubClient client = await clients.Get(cancellationToken);
return await client.Repository.Get(owner, repository);
}
}
Get() uses GH:Token. Get(token) supports an explicit token. Calls with the same token reuse one client; different tokens receive different clients, preventing one caller's credentials from leaking into another caller's requests.
The singleton registration is appropriate for application-wide reuse. A scoped registration is also available when an application intentionally wants a separate per-scope cache.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Octokit (>= 14.0.0)
- Soenneker.Extensions.Configuration (>= 4.0.890)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.GitHub.Client:
| Package | Downloads |
|---|---|
|
Soenneker.GitHub.BranchPolicies
Reads, updates, and removes GitHub branch protection rules. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.2618 | 0 | 9/13/2026 |
| 4.0.2617 | 0 | 9/13/2026 |
| 4.0.2616 | 0 | 9/13/2026 |
| 4.0.2615 | 36 | 9/12/2026 |
| 4.0.2614 | 45 | 9/12/2026 |
| 4.0.2613 | 46 | 9/12/2026 |
| 4.0.2612 | 40 | 9/12/2026 |
| 4.0.2611 | 111 | 9/9/2026 |
| 4.0.2610 | 90 | 9/9/2026 |
| 4.0.2609 | 96 | 9/8/2026 |
| 4.0.2608 | 101 | 9/8/2026 |
| 4.0.2607 | 92 | 9/8/2026 |
| 4.0.2606 | 125 | 9/7/2026 |
| 4.0.2605 | 104 | 9/7/2026 |
| 4.0.2604 | 86 | 9/7/2026 |
| 4.0.2603 | 106 | 9/5/2026 |
| 4.0.2602 | 128 | 9/4/2026 |
| 4.0.2601 | 105 | 9/4/2026 |
| 4.0.2600 | 134 | 8/31/2026 |
| 4.0.2599 | 91 | 8/31/2026 |
Updated Multiple NuGet packages