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

How to use github nuget packages on Visual Studio 2019

$
0
0

I try to learn Github action and packages. So, I create a sample nuget package and successfully created. However I could not use it.

I follow this step;

  1. Options > Nuget Package Manager > Package Sources
  2. Click add button write organization name and add package source address like that:enter image description here

  3. After that Visual Studio doesn't ask me any credential for this address.

  4. If there is no credential, I will expect to an error. And I got it.

    [github] Failed to retrieve metadata from source 'https://nuget.pkg.github.com/[OrganizationName]/query?q=&skip=0&take=26&prerelease=false&semVerLevel=2.0.0'. Response status code does not indicate success: 401 (Unauthorized).

  5. Then, I decide to some credential like explained in github documentation.

  6. My nuget.config file:enter image description here

  7. However still I get Unauthorized error. And also when I click the error link gettin a message like that:

{"errors":[{"code":"Your token has not been granted the required scopes to execute this query. The 'id' field requires one of the following scopes","message":" ['read:packages'], but your token has only been granted the: [''] scopes. Please modify your token's scopes at: https://github.com/settings/tokens."}]}

but I already have a token with read/write package credential.enter image description here

  1. All that fails and I try to another way. I add credential information to Windows Credential Manager. Eveything still same.

So, how I add and use my private nuget packages?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



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