GitHub Actions NuGet Error: unable to get local issuer certificate

64 Views Asked by At

I am trying to write a github actions workflow that will run a nuget pack and nuget push command. I'm trying to use the official nuget github actions workflow: https://github.com/marketplace/actions/setup-nuget-exe-for-use-with-actions

but when I run my workflow:

name: Release New NuGet Package

on:
  workflow_dispatch:
    inputs:
      nugetPkgProjectName:
        description: 'Enter your NuGet Package Project Name:'
        required: true
        type: string
jobs:
  begin:
    runs-on: martin-laptop
    steps:
        - uses: actions/checkout@v3
          with:
            sparse-checkout: |
              Martin Nuget Work
        - name: Run nuget pack with nuget actions
          uses: NuGet/[email protected]
          with:
            nuget-version: '5.x'
        - run: |
            cd "Martin Nuget Work"
            nuget pack template.nuspec -Version 2.2.2 -Properties id=MypackageName.fpga
 

i get this error:

Run NuGet/[email protected]
  with:
    nuget-version: 5.x
  env:
    NEW_VERSION: 0.0.0
Error: unable to get local issuer certificate

After some research, I see solutions saying I need to set an env var pointing to a .pem file:

NODE_EXTRA_CA_CERTS: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem

but on my win10 machine where I am running my github actions runner, i'm not sure where to find this .pem file. and is there any way to solve this issue without having to manually set an env var?

0

There are 0 best solutions below