question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Access denied for NuGet package source while build dotnet/cli 3.1.300 Tag

See original GitHub issue

I’m trying to build version 3.1.300 of the dotnet/cli repository but the build.sh fails during the restore process with the following error message:

/build/cli/artifacts/toolset/restore.proj : error : Unable to load the service index for source https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-core-setup-0c2e69ca/nuget/v3/index.json.
100 | /build/cli/artifacts/toolset/restore.proj : error : Unable to load the service index for source https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-corefx-059a4a19/nuget/v3/index.json.
101

When I try to go directly to the URL for the package source I get access denied:

{"$id":"1","innerException":null,"message":"TF400813: The user 'Windows Live ID\\xxx@gmail.com' is not authorized to access this resource.","typeName":"Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server","typeKey":"UnauthorizedRequestException","errorCode":0,"eventId":3000}

The https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-core-setup-0c2e69ca/nuget/v3/index.json package source is coming from the NuGet.config file here https://github.com/dotnet/cli/blob/v3.1.300/NuGet.config

Why are the package source requiring authentication and how are automation machines not running in the .NET team’s build system supposed to be able to build the project if authentication is required.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:30 (29 by maintainers)

github_iconTop GitHub Comments

3reactions
asbjornucommented, Aug 2, 2020

Seems like https://github.com/dotnet/cli/commit/7c1fa3d6c7ce4082a4c9974643536f821b91800c#diff-a7c26590e27fcbb61c69ff2564beb1fa changed the feeds from darc-pub-dotnet-* to darc-int-dotnet-*, which I assume made them go from public to internal. As the change is made by @dotnet-bot, I can’t think of any other reason for this change than an oversight and that this must be a bug.

Simply removing the internal feeds from NuGet.config just leads to a swath of other problems saying Source control information is not available - the generated source link is empty. I don’t even know where to begin looking for the source of this problem, so some assistance would be helpful.

Trying to build a version from before https://github.com/dotnet/cli/commit/7c1fa3d6c7ce4082a4c9974643536f821b91800c, such as v3.1.201, ends up printing an almost endless amount of the similar error message to the console:

Retrying 'FindPackagesByIdAsync' for source 'https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/2160f577-8dc0-4c31-83d2-8d0e0da8208c/nuget/v3/flat2/runtime.native.system/index.json'.
  An error occurred while sending the request.
    Problem with the SSL CA cert (path? access rights?)

Finally failing and halting on the following error:

.dotnet/sdk/3.1.200-preview-014946/NuGet.targets(124,5): error : Too many open files [Microsoft.DotNet.Cli.sln]

Trying to access one of the faulty feeds ends up returning the following JSON-wrapped exception:

{
    "$id": "1",
    "innerException": null,
    "message": "Can't find the package 'runtime.native.system' in feed 'dotnet3.1'.",
    "typeName": "Microsoft.VisualStudio.Services.NuGet.WebApi.Exceptions.PackageNotFoundException, Microsoft.VisualStudio.Services.NuGet.WebApi",
    "typeKey": "PackageNotFoundException",
    "errorCode": 0,
    "eventId": 3000
}

So currently, it seems impossible to build any version of .NET Core from source unless you’re hired by Microsoft and have access to their internal NuGet feeds. That’s very, very unfortunate. A fix would be highly appreciated. 🙏

1reaction
asbjornucommented, Oct 13, 2020

With Homebrew/homebrew-core#60929 merged, this can be considered fixed for me at least.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuget add packages gives access denied errors
Access to the path 'Microsoft.DotNet.InternalAbstractions.dll' is denied. I tried running Visual Studio 2015 as Administrator and uninstalling ...
Read more >
Troubleshooting NuGet Package Restore in Visual Studio
This error occurs when you attempt to build a project that contains references to one or more NuGet packages, but those packages are...
Read more >
NuGet packages in the Package Registry
When asking for versions of a given NuGet package name, the GitLab Package Registry returns a maximum of 300 most recent versions.
Read more >
dotnet nuget add source command - .NET CLI
The dotnet nuget add source command adds a new package source to your NuGet configuration files.
Read more >
NuGet private registry authorization fails with "Access ...
I am trying to setup a Windows build with access to the GitHub Package Registry, specifically for NuGet packages. When you attempt to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found