UniGetUI icon indicating copy to clipboard operation
UniGetUI copied to clipboard

How to integrate self hosted personal repository. Getting an error when trying to add the source.

Open JZafarr opened this issue 1 year ago • 6 comments

Hi there,

I have created my own personal repostiory via Winget Pro, it gives me a link along with UniqueURL and I'm able to add the source to Winget in Powershell without any issue via the Microsoft REST API provided in the documentation of Winget Pro.

The link is something like this: winget source add -n example.myrepo.com -a https://example.myrepo.com/uniqueurl -t "Microsoft.Rest"

However when I try to add this repository to WingetUI, I get an error as shown in the screenshot below: Screenshot 2024-02-03 041559

JZafarr avatar Feb 02 '24 23:02 JZafarr

Hello,

Try this issue https://github.com/marticliment/WingetUI/issues/1721

marticliment avatar Feb 03 '24 12:02 marticliment

I tried it, deleted the folder and restarted and added via just the the address/uniqueurl but its still giving me error, normal winget repository works fine, its only when I try to add my own source, i get this error: Screenshot 2024-02-03 195520

JZafarr avatar Feb 03 '24 14:02 JZafarr

Running the command C:\Program Files\WingetUI\wingetui\PackageEngine/Managers\winget-cli_x64\winget.exe source add sourcename url does work?

marticliment avatar Feb 03 '24 15:02 marticliment

It worked but only with the following command:

It doesnt work when i just add the name and URL, it shows the same error but in the terminal instead: Screenshot 2024-02-03 204428

But when I used the following command, it has worked. I can now see my repo in the list and can install packages from it: C:\Program Files\WingetUI\wingetui\PackageEngine/Managers\winget-cli_x64\winget.exe source add -n example.myrepo.com -a https://example.myrepo.com/uniqueurl -t "Microsoft.Rest"

Thank you

JZafarr avatar Feb 03 '24 15:02 JZafarr

Therefore, WingetUI is calling the wrong command.

I will fix this

marticliment avatar Feb 03 '24 15:02 marticliment

Hello, It's missing "Source type" select field in "Add source" popup, there are 2 types [Microsoft.PreIndexed.Package, Microsoft.Rest]. This should fix the issue. image

taki-eddine-47 avatar Apr 14 '24 12:04 taki-eddine-47

This issue was fixed on a previous commit.

Changes will be effective on future releases

marticliment avatar May 30 '24 13:05 marticliment