Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Unable to Push GitHub Package for Nuget

$
0
0

I followed all guidance so as to be able to push a nuget package of my class library into my private GitHub repository.

I added the following to my csproj

<PropertyGroup><TargetFramework>net5.0</TargetFramework><PackageId>NextWareProductPortalClientServices</PackageId><Version>1.0.1</Version><Authors>CodeGenerator</Authors><Company>NextWare</Company><PackageDescription>This package adds gRPC client library for the NextWare ProductPortal </PackageDescription><RepositoryUrl>https://github.com/NextWareGroup/PPD</RepositoryUrl></PropertyGroup>

I added the following nuget.config file to the root of the project..

<?xml version="1.0" encoding="utf-8"?><configuration><packageSources><clear /><add key="github" value="https://nuget.pkg.github.com/jkears/index.json" /></packageSources><packageSourceCredentials><github><add key="Username" value="jkears" /><add key="ClearTextPassword" value="******6d5a57b7527dfcc646b62ca7d1*****" /></github></packageSourceCredentials></configuration>

The Personal Token has all permissions applied.

After running the dotnet cli to create the package I see the package in the bin\release folder.Then I attempt to run the following command...

dotnet nuget push "bin/Release/NextWareProductPortalClientServices.1.0.1.nupkg" --source "github"

The output is as follows;

warn : No API Key was provided and no API Key could be found for 'https://nuget.pkg.github.com/jkears'. To save an API Key for a source use the 'setApiKey' command.Pushing NextWareProductPortalClientServices.1.0.1.nupkg to 'https://nuget.pkg.github.com/jkears'...  PUT https://nuget.pkg.github.com/jkears/An error was encountered when fetching 'PUT https://nuget.pkg.github.com/jkears/'. The request will now be retried.An error occurred while sending the request.  The response ended prematurely.  PUT https://nuget.pkg.github.com/jkears/An error was encountered when fetching 'PUT https://nuget.pkg.github.com/jkears/'. The request will now be retried.An error occurred while sending the request.  The response ended prematurely.  PUT https://nuget.pkg.github.com/jkears/error: An error occurred while sending the request.error:   The response ended prematurely.

I have researched this issue but none of the reported fixes work for me, including running directly from Nuget CLI.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>