So, much research has shown that the only way to push a NuGet package to the VSTS Package Management is with the CLI tools vs the NuGet Package Explorer app. So, I'm hoping to fix that to make life easier.
Initial research makes me think that I can use one of the REST APIs that Microsoft offers. When I use the link below in Postman, I get the response back that would normally be the Microsoft login page, which is what I would expect when I'm not passing any authentication in the GET request.
However, when I replace the demo account and feed name with my own, I get a 401 error.
https://sartainsoftwaresolutions.feeds.visualstudio.com/DefaultCollection/_apis/packaging/feeds/SartainSoftware.Common/packages?api-version=2.0-preview
Unless I have to enable access to the given API in my VSTS account, I'm not sure what I'm missing.
Any thoughts?
First, regarding 401 issue, you need to specify alternate authentication credential (Profile >Security > Alternate authentication credentials) or Personal access token (user name is empty, do not need to specify), you can’t use email account directly (e.g. xxx.hotmail.com)
Secondly, to push a NuGet Package, you can use this REST API:
Put
https://[account].pkgs.visualstudio.com/_packaging/[feed id]/nuget/v2/Simple steps for Postman:
X-NuGet-ApiKey; value:VSTS)Regarding login page issue, it won't redirect to login page if current user is not authenticated when call REST API. You can authorize access to REST APIs with OAuth.