-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Choosing DotNet Restore Package Source #6295
Comments
Found a workaround for this, simply create a NuGet.config file in the project directory which contains the following:
|
This can be marked as closed. |
I had a similar issue running
The cause was bad packages cached by paket itself, To solve this, one has to clear the cache by running:
Alternatively, you can manually delete the contents of the cache folder You may want to close any Visual Studio instances as they may prevent the purging of the cache directory. |
Steps to reproduce
Not sure if anyone have encountered this issue, where dotnet restore is not restoring from nuget.org, instead it is restoring from other another source from my list of package sources.
Following's how my NuGet.Config looks like:
<?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> <add key="Custom-AD" value="http://server1/httpAuth/app/nuget/v1/FeedService.svc/" /> <add key="Custom" value="http://server2:8080/guestAuth/app/nuget/v1/FeedService.svc/" /> </packageSources> <activePackageSource> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> </activePackageSource> </configuration>
What i did was simply:
This is when things broke for me. It works on another environment I had where there is only 1 package source.
I was wondering if this is due to the fact that I have private sources? And is there anyway for me to select which sources I want to include / exclude?
Actual behavior
log : Restoring packages for C:\play\core-a\project.json...
info : GET http://server1/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App'
info : GET http://server2:8080/guestAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App'
info : NoContent http://server2:8080/guestAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App' 31ms
info : Unauthorized http://server1/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App' 140ms
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app/index.json
log : Retrying 'FindPackagesByIdAsyncCore' for source 'http://server1/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App''.
log : Response status code does not indicate success: 401 (Unauthorized).
info : GET http://server1/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App'
info : Unauthorized http://server1/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App' 139ms
log : Retrying 'FindPackagesByIdAsyncCore' for source 'http://server1/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App''.
log : Response status code does not indicate success: 401 (Unauthorized).
info : GET http://server1/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App'
info : Unauthorized http://server1/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App' 144ms
error: Failed to retrieve information from remote source 'http://server1/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App''.
error: Response status code does not indicate success: 401 (Unauthorized).
error: Failed to retrieve information from remote source 'http://server1/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App''.
error: Response status code does not indicate success: 401 (Unauthorized).
Environment data
.NET Command Line Tools (1.0.0-preview1-002702)
Product Information:
Version: 1.0.0-preview1-002702
Commit Sha: 6cde21225e
Runtime Environment:
OS Name: Windows
OS Version: 6.3.9600
OS Platform: Windows
RID: win81-x64
The text was updated successfully, but these errors were encountered: