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
                    
if you are setting up this repo
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
                    
nuke :add-package nuget-plugin-github-credential-provider --version 1.0.0
                    

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 gh CLI
  • Supports GitHub.com and GitHub Enterprise Server
  • Falls back to GH_TOKEN or GITHUB_TOKEN environment 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 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