adrian-pavel / visual-nuget

Code for the Visual NuGet package manager extension for VS Code.
MIT License
30 stars 5 forks source link

Private package source doesn't work. #17

Closed jeffhli closed 1 year ago

jeffhli commented 2 years ago

I have set the config like this: image But it doesn't work due to the request without the authorization header. image

adrian-pavel commented 2 years ago

Hello. I haven't tested Artifactory but the way you've set the token seems to be OK according to their docs. Can you maybe try and open the developer tools in VS code and see all the requests happening? Also maybe try Basic authentication instead of Bearer? Like the docs say about Azure DevOps. One issue could be if the behavior of the Artifactory API is similar to GitHub Packages, in that it does not provide the proper origin headers. I've created a stackoverflow post here bout it but unfortunately got no responses. If anyone reading this has any idea how to fix this, please let me know.

jeffhli commented 2 years ago

@adrian-pavel I have used the basic authentication to try connect, but still get an error. image The request and response are the same as the above

mbastiani commented 2 years ago

Hello. I managed to make it work using the tip from this link: https://github.com/VSCodium/vscodium/issues/746#issuecomment-891312271

1) Run VSCode with --disable-web-security 2) Edit ~/.vscode-oss/argv.json ​and add the line "enable-browser-code-loading": false