Skip to content

Error: "The specified source 'github' is invalid. Provide a valid source." when publishing nuget package to github #49186

Answered by wirejp
wirejp asked this question in Packages
Discussion options

You must be logged in to vote

Hello,

I was able to resolve my issue and I successfully published the nuget package to GitHub. I found a solution on stackoverflow website: -
Getting error when using GitHub Actions to push the nupkg to my GitHub packages.
In my case, I ran the following command Package Manager Console in Visual Studio: -
PM> dotnet nuget add source --username OWNER --password ${{secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/OWNER/index.json" (replace OWNER with your username or company name).

Afterwards, I published the nuget package to GitHub using the following command in Package Manager Console in Visual Studio: -
PM> dotnet nuget push "C:\Users\Us…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wirejp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Packages Host your dependencies, libraries, and production-ready code, right from your repository Question
1 participant