GhCredentialProvider 0.1.1
Suggested Alternatives
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet tool install --global GhCredentialProvider --version 0.1.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local GhCredentialProvider --version 0.1.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=GhCredentialProvider&version=0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package GhCredentialProvider --version 0.1.1
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
TODO: Publish to nuget so this can be installed as a tool.
mise install - Note that this only works on Mac and Linux for now.
Configuration
Authenticate with GitHub CLI:
gh auth login
Or set an environment variable:
export GH_TOKEN=ghp_your_token_here
For GitHub Enterprise:
gh auth login --hostname ghe.company.com
Usage
The plugin automatically provides credentials when accessing GitHub Package feeds:
dotnet restore --source https://nuget.pkg.github.com/owner/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 |
|---|