Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ground Controller Lvl 2
Message 11 of 17

Re: Unable pushing NuGet package to GitHub Packages with "The expected resource was not found.&

Were you able to resolve this? I'm having the same problem attempting to push a ruby gem

Highlighted
Copilot Lvl 2
Message 12 of 17

Re: Unable pushing NuGet package to GitHub Packages with "The expected resource was not found.&

I'm in the same boat. Anyone was able to sort this one out?
Highlighted
Ground Controller Lvl 1
Message 13 of 17

Re: Unable pushing NuGet package to GitHub Packages with "The expected resource was not found.&

Make sure you correctly specified repository url, as in

<RepositoryUrl>https://github.com/user-name/repo-name</RepositoryUrl>
Highlighted
Copilot Lvl 3
Message 14 of 17

Re: Unable pushing NuGet package to GitHub Packages with "The expected resource was not found.&

I got this working by adding this to my nuspec file

 

<repository type="git" url="https://github.com/user-name/repo-name" />

 

Highlighted
Copilot Lvl 3
Message 15 of 17

Re: Unable pushing NuGet package to GitHub Packages with "The expected resource was not found.&

You can also specify it on the command line (dotnet or MSBuild) using `-p:RepositoryUrl=`

Highlighted
Ground Controller Lvl 2
Message 16 of 17

Re: Unable pushing NuGet package to GitHub Packages with "The expected resource was not found.&

Hitting the same issue when publishing a .NetCore2.1 library from Windows command line.

 

C:\TestProject>nuget push source\TestProject.Core.Domain\bin\Release\TestProject.Core.Domain.1.0.0.1.nupkg -Source "github"
WARNING: No API Key was provided and no API Key could be found for 'https://nuget.pkg.github.com/ABCCorp'. To save an API Key for a source use the 'setApiKey' command.
Pushing TestProject.Core.Domain.1.0.0.494-alpha.nupkg to 'https://nuget.pkg.github.com/ABCCorp'...
  PUT https://nuget.pkg.github.com/ABCCorp/
WARNING: The expected resource was not found.
  NotFound https://nuget.pkg.github.com/ABCCorp/ 1820ms
Response status code does not indicate success: 404 (Not Found).

 

Have followed advice in every post/example I can find.

Using a Personal Access Token with repo, write:packages, read:packages and delete:packages scope.

Have tried using a nuget.config file, and adding source on command line.

Project file specifies the RepositoryURL, PackageId, RepositoryType, Company, Version etc.

Really can't see why this wouldn't work.

 

 

Highlighted
Copilot Lvl 3
Message 17 of 17

Re: Unable pushing NuGet package to GitHub Packages with "The expected resource was not found.&

I found a fix for this, I triple checked I had all my names set correct per the GitHub documentation and nothing worked...finally I decided to pull dotnet out of the equation and just a nuget push....voila, it worked like a champ! Try your push command without the dotnet prefix.....