Skip to content
lock

GitHub Action

GitHub NuGet Private Source Authorisation

v21.08.0 Latest version

GitHub NuGet Private Source Authorisation

lock

GitHub NuGet Private Source Authorisation

Authorises access to a private GitHub NuGet package source, so you can restore packages

Installation

Copy and paste the following snippet into your .yml file.

              

- name: GitHub NuGet Private Source Authorisation

uses: StirlingLabs/GithubNugetAuthAction@v21.08.0

Learn more about this action in StirlingLabs/GithubNugetAuthAction

Choose a version

🔓 GitHub NuPkg Source Authorisation Action

Codacy Badge

Authorises access to a private GitHub NuGet package source, so you can restore packages.

⚠️ Warning

  • This Action writes the PAT value to disk in plain text... because NuGet requires that on linux.
  • Please ensure that you scope the PAT to only read packages and that you are prepared to accept the risk of the PAT escaping.

🚀 Quickstart

      - name: Authorise NuGet
        uses: StirlingLabs/GithubNugetAuthAction@main
        with:
          owner: ${{github.repository_owner}}
          name: MyNuPkgRepo
          token: ${{secrets.NUGET_PAT}}
      - name: Restore NuPkg
        run: dotnet restore SolutionName.sln

Parameters

Name Function
owner The owner of the package repository, defaults to the owner of the repository the Action is running within.
name Name of the package repository, defaults to "GitHub-$owner".
token Personal Access Token with permission to read packages.
force-cleartext-storage Force storing the token in clear text. This is a workaround for some .NET versions.