Unauthorized nuget package from Visual Studio Team Services using asp.net core rc2
I know that it's not exactly the same issue, but people may come across this one alongside as I did.
I have installed VS Community 2019 and yesterday I decided to remove the VS 2017, but after that, when I tried to restore the Nuget Packages made by the company, it started displaying an error of 401 Unauthorized.
After a few net searches I decided I didn't want to mess around with VS configurations and files, I then realized, since it's an 404 it's related with an account so what I did was:
- Closed VS2019
- Went to windows management credentials and removed all those that where related with my packages
- Reopened VS 2019 and restored the Nuget Packages for my solution. It them asked for my credentials, set it up and all went well from here.
Here are the two accounts I removed and got recreated:
I can reproduce your issue at my side and following is the workaround I use to restore the packages:
- Remove the VSTS feed resource from "VS\Tools\NuGet Package Manager\Package sources".
- Open "Packages" tab from your VSTS web portal.
- Select the feed you want to connect and click "Connect to feed" option.
- Select "Personal Access Tokens" method in the dialog.
- Copy the generated command in the dialog.
- Run CMD as Administrator on you machine.
- Paste the copied command into CMD.
- Add "-StorePasswordInClearText" argument after the command.
- Run the command.
- Restart the VS.
- Install and restore the packages.