Skip to content

Instantly share code, notes, and snippets.

@alec1o
Last active June 1, 2024 23:29
Show Gist options
  • Select an option

  • Save alec1o/af70d776c8edbcd0fe4369a8f3f958d4 to your computer and use it in GitHub Desktop.

Select an option

Save alec1o/af70d776c8edbcd0fe4369a8f3f958d4 to your computer and use it in GitHub Desktop.
GitHub nuget registry

More info here: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry#authenticating-with-a-personal-access-token

  • Add source
    dotnet nuget add source \
    --username <username> \
    --password <github-token> --store-password-in-clear-text \
    --name github "https://nuget.pkg.github.com/<username/organization>/index.json"
  • Push
    dotnet nuget push "<project-path>.nupkg" --source "github"
    # e.g. dotnet nuget push "bin/Release/Example.1.0.0.nupkg" --source "github"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment