Repository navigation
Closed
Description
In my nuget config I've added a private myget feed:
<add key="[FEEDNAME]" value="https://www.myget.org/F/[FEEDNAME]/auth/[TOKEN]/api/v2" />
When I add a package from that feed in the project.json it doesn't resolve in Visual Studio. If I run a kpm restore it resolves against the pre-authenticated url successfully. It then attempts to resolve against the non-authenticated url 3 times, each failing with a 401 and ultimately failing the restore. Here's the output:
C:\source\src\[PROJECT] [master +0 ~2 -0]> kpm restore
Restoring packages for C:\source\src\[PROJECT]\project.json
CACHE https://www.myget.org/F/aspnetmaster/api/v2/FindPackagesById()?Id='[PACKAGENAME]'
CACHE https://www.nuget.org/api/v2/FindPackagesById()?Id='[PACKAGENAME]'
GET https://www.myget.org/F/[FEEDNAME]/auth/[TOKEN]/api/v2/FindPackagesById()?Id='[PACKAGENAME]'.
OK https://www.myget.org/F/[FEEDNAME]/auth/[TOKEN]/api/v2/FindPackagesById()?Id='[PACKAGENAME]' 49469ms
GET https://www.myget.org/F/[FEEDNAME]/api/v2/package/[PACKAGENAME]/0.0.1.
Warning: DownloadPackageAsync: https://www.myget.org/F/[FEEDNAME]/api/v2/package/[PACKAGENAME]/0.0.1
Response status code does not indicate success: 401 (Unauthorized).
GET https://www.myget.org/F/[FEEDNAME]/api/v2/package/[PACKAGENAME]/0.0.1.
Warning: DownloadPackageAsync: https://www.myget.org/F/[FEEDNAME]/api/v2/package/[PACKAGENAME]/0.0.1
Response status code does not indicate success: 401 (Unauthorized).
GET https://www.myget.org/F/[FEEDNAME]/api/v2/package/[PACKAGENAME]/0.0.1.
Error: DownloadPackageAsync: https://www.myget.org/F/[FEEDNAME]/api/v2/package/[PACKAGENAME]/0.0.1
Response status code does not indicate success: 401 (Unauthorized).
----------
System.ArgumentNullException: Value cannot be null.
Parameter name: stream
at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding)
at Microsoft.Framework.PackageManager.PackageUtilities.<OpenNuspecStreamFromNupkgAsync>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Framework.PackageManager.Restore.NuGet.NuGetv2Feed.<OpenNuspecStreamAsync>d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Framework.PackageManager.RemoteWalkProvider.<GetDependencies>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Framework.PackageManager.RestoreOperations.<FindLibraryEntry>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Framework.PackageManager.RestoreOperations.<CreateGraphNode>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Framework.PackageManager.RestoreOperations.<CreateGraphNode>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.Framework.PackageManager.RestoreCommand.<RestoreForProject>d__62.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Framework.PackageManager.RestoreCommand.<ExecuteCommand>d__61.MoveNext()
----------
Restore failed
Value cannot be null.
Parameter name: stream
Metadata
Metadata
Assignees
Labels
No labels
Activity
Praburaj commentedon Mar 31, 2015
Can you try adding this to your
Nuget.configand retry?troyschneringer commentedon Apr 9, 2015
That does work, however I'd prefer not to have my password in plain text and the pre-authenticated url seemed to be the best approach for that.
aspnet-hello commentedon Dec 31, 2017
This issue is being closed because it has not been updated in 3 months.
We apologize if this causes any inconvenience. We ask that if you are still encountering this issue, please log a new issue with updated information and we will investigate.
Merge pull request #424 from aspnet/revert-423-release/2.1