Skip to content
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

I configured a custom source and it doesn't seem to work #63

Open
dodu2014 opened this issue May 4, 2023 · 8 comments
Open

I configured a custom source and it doesn't seem to work #63

dodu2014 opened this issue May 4, 2023 · 8 comments

Comments

@dodu2014
Copy link

dodu2014 commented May 4, 2023

"nugetpackagemanagergui.packageSources": [
    {
      "sourceName": "BaGet",
      "searchUrl": "https://nuget.mydomain.com/v3/search",
      "packageUrl": "https://nuget.mydomain.com/packages/{{packageName}}",
      "packageVersionsUrl": "https://nuget.mydomain.com/v3/package/{{packageName}}/index.json",
      "sourceType": "server"
    }
  ]

Baget type based hosting, can you help me see where the problem is?

@jeremy-allocate
Copy link

I did the same today and got the same problem, it just sits there trying to connect forever when I run a search via the plugin even though it shows the new source on the search page. I can reach baget in the browser and upload to it just fine though.

My settings are identical to yours aside from the domain:port...

@jeremy-allocate
Copy link

jeremy-allocate commented Aug 9, 2023

Also, this view in the marketplace (just the readme?) is missing a baget URL (packageUrl specifically):

image

@careless6666
Copy link

careless6666 commented Oct 12, 2023

I have same problem, i configure all url and check that return data in my browser

{
    "C_Cpp.default.compilerPath": "/usr/bin/gcc",
    "omnisharp.enableDecompilationSupport": true,
    "omnisharp.enableRoslynAnalyzers": true,
    "dotnet.completion.showCompletionItemsFromUnimportedNamespaces": true,
    "nugetpackagemanagergui.packageSources": [
        {
            "sourceName": "name",
            "preRelease": true,
            "packageVersionsUrl": "https://nexus.domain/repository/nuget-hosted/v3/content/{{packageName}}/index.json",
            "packageUrl": "https://nexus.domain/repository/nuget-group/{{packageName}}",
            "searchUrl": "https://nexus.domain/repository/nuget-hosted/v3/query/0",
            "sourceType": "server"
        }
    ]
}

@thepaleone
Copy link

I'm facing the same issue using a custom installation of Baget. My settings are the same as @dodu2014 other than the domain. I've tried debugging but the developer console doesn't have any additional information that I can find. Looking through the source code (I'm not a TypeScript dev so take with a grain of salt) I can't seem to tell exactly what it's doing, but my suspicion is that it has a problem when there's more than one URL, almost like it's not handling the array properly. 100% guessing there and likely very wrong, but I wanted to provide as much detail as I could.

@andyqp
Copy link

andyqp commented Feb 22, 2024

It is very important to get the "authorization" part right. Even if you can open the configured URLs in browser, it could be that the browser has cached the authorization info. That information is not accessible from the plugin, so you must fully specify the "authorization" structure in the source definition.

@thepaleone
Copy link

Hi @andyqp, I believe I've done that. The source does not require authorization so I chose "none" per the docs. I tried both with and without the username and password (specified as an empty string). I've also tired it removing the `authorization" completely. Same results for all.

"authorization": {
    "type": "none",
    "username": "",
    "password": ""
},

and

"authorization": {
    "type": "none"
},

@aliasadidev
Copy link
Owner

@thepaleone @andyqp @careless6666 @jeremy-allocate @dodu2014

Could you please provide the following information:

  • Version of VSCode
  • Operating System
  • Version of vscode-npm-gui
  • BaGet server version (docker image version if it's possible)

@thepaleone
Copy link

thepaleone commented Feb 25, 2024

It's been doing this for several months so the some of the component versions have updated over time, but currently they are:

  • VSCode 1.86.2
  • OS Windows 11 Version 24H2
  • vscode-npm-gui 2.0.6
  • BaGet Docker image 0.4.0-preview2

As of this writing it's the most recent of all components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants