Skip to content

develop pre-release publishing fails: nuget.org rejects push with 403 #1128

Open

Description

@icnocop
  • Version: develop (latest published pre-release is 0.6.0-pre.165, Oct 1)
  • Target: CI – Build and Publish workflow, 2 / Publish job

Problem

No ElectronNET.Core pre-release has been published from develop since 0.6.0-pre.165 (Oct 1), so changes merged since then (#1116–#1125) aren't available as packages.

The two most recent develop runs pass the integration tests, then fail in the PublishPackages Nuke target when pushing to nuget.org:

Forbidden https://www.nuget.org/api/v2/package/
error: Response status code does not indicate success: 403 (The specified API key is invalid, has expired, or does not have permission to access the specified package.).
Target "PublishPackages" has thrown an exception

The develop runs before that (Oct 18 – Oct 27) failed earlier in integration tests, so Publish never ran and it isn't clear when the key stopped working.

Suggested fix

Rather than generating a new NUGET_API_KEY secret, switch to nuget.org Trusted Publishing, which nuget.org now recommends over API keys for GitHub Actions.

This needs:

  1. A Trusted Publishing policy on nuget.org, created by the account or organization that owns the ElectronNET.Core* packages, for repository ElectronNET/Electron.NET and workflow file Build and Publish.yml.
  2. A workflow change to request the temporary key in the Publish job.

Why it matters

Pre-releases are the only way to consume develop fixes without building Electron.NET locally.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions