nuget-plugin-github-credential-provider
1.0.0
dotnet tool install --global nuget-plugin-github-credential-provider --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local nuget-plugin-github-credential-provider --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=nuget-plugin-github-credential-provider&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package nuget-plugin-github-credential-provider --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Github Nuget Credential Provider
A NuGet cross-platform credential provider plugin that uses the GitHub CLI (gh) to authenticate with GitHub Package feeds.
Features
- Automatically retrieves GitHub tokens using the
ghCLI - Supports GitHub.com and GitHub Enterprise Server
- Falls back to
GH_TOKENorGITHUB_TOKENenvironment variables - Cross-platform support (Windows, macOS, Linux)
Requirements
- .NET 10.0 or later
- GitHub CLI (
gh) installed and authenticated (optional if using environment variables) - NuGet 4.8+ with cross-platform plugin support
Installation
Install from NuGet:
dotnet tool install -g nuget-plugin-github-credential-provider
Configuration
Authenticate with GitHub CLI:
gh auth login
Or for GitHub Enterprise:
gh auth login --hostname ghe.company.com
Or set an environment variable:
export GITHUB_TOKEN=ghp_your_token_here
Usage
The plugin automatically provides credentials when accessing GitHub Package feeds:
dotnet restore --source https://nuget.pkg.github.com/example/index.json
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 153 | 1/23/2026 |