Baget: nuget list command failed

0

Describe the bug

when i run below command line:

nuget list -s http://get.blabla.com

the response is:

“doctype”是意外的标记。标记应为“DOCTYPE”。 第 1 行,位置 3。
"doctype"  is exception mark, should be "DOCTYPE". line 1, position 3.

by the way, in visual studio 2017, when i add the 'http://get.balbla.com' as a new nuget server source, i get the same error message. any help very thanks.

timiil picture timiil  ·  2 Jan 2019

Most helpful comment

3

@stamepicmorg I'll likely add in these legacy APIs at some point, but this isn't a very high priority for me. What're you using nuget list for? FYI, this command is now deprecated and will be removed in future versions of NuGet. See https://github.com/NuGet/Announcements/issues/34

loic-sharma picture loic-sharma  ·  4 Apr 2019

All comments

0

hi,
please provide more information about your setup ...

Question:

The „是意外的标记。标记应为“ is coming from the configuration or from data (nuge package)
if it comes from data, can you provide the nuget package or at least the nuspec ?

regards
Werner

WernerMairl picture WernerMairl  ·  5 Jan 2019
1

Hey @timiil, I apologize for the long response time. It seems that you're package source is incorrect. If you're running on localhost, this would be http://localhost:5000/v3/index.json. I'm not sure how your server is setup, but I would try http://get.blabla.com/v3/index.json as your source. Please let me know if you have any additional questions!

loic-sharma picture loic-sharma  ·  29 Jan 2019
0

Also, the nuget list command won't work until the the V2 APIs are implemented on BaGet (this is tracked by https://github.com/loic-sharma/BaGet/issues/43).

loic-sharma picture loic-sharma  ·  29 Jan 2019
1

@loic-sharma, Hello! i have tried it with "/v3/index.json" and it not working too.

123


can u plese look at fixes from @tomzo? https://github.com/loic-sharma/BaGet/issues/43#issuecomment-429243641

his commit: https://github.com/ai-traders/BaGet/commit/dcd815ae0c36362ea1fe85724508831bcd325a8f


alternative pr: https://github.com/loic-sharma/BaGet/pull/178

stamepicmorg picture stamepicmorg  ·  3 Apr 2019
3

@stamepicmorg I'll likely add in these legacy APIs at some point, but this isn't a very high priority for me. What're you using nuget list for? FYI, this command is now deprecated and will be removed in future versions of NuGet. See https://github.com/NuGet/Announcements/issues/34

loic-sharma picture loic-sharma  ·  4 Apr 2019
0

@loic-sharma thanks for reply!

if I understand correctly, nuget.exe is not complete compatible with the baget? (because it use old v2 api but nuget-server migrating to new api v3).


can you give me advice please?

i successfully can download and update my packets, but i cant search. if i want to search packets\get list from my private repo on client should i go another way? should i use nuget.client library for example?

stamepicmorg picture stamepicmorg  ·  4 Apr 2019
0

Hey @timiil, I apologize for the long response time. It seems that you're package source is incorrect. If you're running on localhost, this would be http://localhost:5000/v3/index.json. I'm not sure how your server is setup, but I would try http://get.blabla.com/v3/index.json as your source. Please let me know if you have any additional questions!

thanks for you reply, but the response is :

D:\code\gateway\Deploy>nuget list -s http://get.xxxxxxx.com/v3/index.json
警告: This version of nuget.exe does not support listing packages from package source 'http://get.xxxxxxxx.com/v3/index.json'.
找不到程序包。

(the above Chinese say that "can not find the package ...")

FYI, i am using the newest (2019/04/11 updated)docker image to run baget:

docker run --rm --name baget -p 1601:80 --env-file /home/baget/baget.env -v /home/baget/appsettings.json:/app/appsettings.json -v /home/baget/data:/var/baget loicsharma/baget
timiil picture timiil  ·  11 Apr 2019
0

@loic-sharma thanks for reply!

if I understand correctly, nuget.exe is not complete compatible with the baget? (because it use old v2 api but nuget-server migrating to new api v3).

can you give me advice please?

i successfully can download and update my packets, but i cant search. if i want to search packets\get list from my private repo on client should i go another way? should i use nuget.client library for example?

I have exactly the same issue, I achieved running it and I can even push packages to the server, but I cannot search for them and even download a package. @stamepicmorg did you already find a solution for this?

VitaliiIsaenko picture VitaliiIsaenko  ·  8 Jul 2019
0

did you already find a solution for this?

yep. now i am using another solution and all fine. lol.

stamepicmorg picture stamepicmorg  ·  9 Jul 2019
1

@stamepicmorg What solution could you find for searching nuget packages? Can you share it?
I tried nuget 5.0.2, but can't list packages from command line, however, Visual Studio 2017 can use BaGet without any problem.

triumlabs picture triumlabs  ·  23 Jul 2019
0

@triumlabs i temprerary switched to custom nuget-php realisation. and i testing trial installation of artifactory (but i dont like it).

I'm still very much looking forward to adding support to the baget 👀

stamepicmorg picture stamepicmorg  ·  30 Sep 2019
0

hello! any updates?

stamepicmorg picture stamepicmorg  ·  28 Jun 2020
2

if I understand correctly, nuget.exe is not complete compatible with the baget? (because it use old v2 api but nuget-server migrating to new api v3).

Yes that's correct. BaGet supports the latest NuGet protocol. All dotnet CLI features should work as expected while using BaGet.

However, BaGet does not support the legacy V2 protocol. As a result, some features on nuget.exe, like nuget list, are currently broken. Adding support for the legacy V2 protocol is still not a very high priority for me. I work on BaGet mainly for fun in my free time, reverse engineering a legacy protocol is not very fun 😥

i successfully can download and update my packets, but i cant search. if i want to search packets\get list from my private repo on client should i go another way? should i use nuget.client library for example?

Here are some options:

  1. BaGet's website has a UI that lets you search for packages
  2. You can add BaGet as a package source on Visual Studio, Visual Studio for Mac, or Rider. These IDEs support searching through your package sources
  3. I've also created a CLI app nugs that you can use to search against a NuGet server (note that my prototype only supports nuget.org). We're working on integrating this into NuGet itself, see this spec: https://github.com/NuGet/Home/pull/9718
  4. You can use BaGet's SDK to create your own app to search for packages: https://loic-sharma.github.io/BaGet/tools/sdk/#search-for-packages
loic-sharma picture loic-sharma  ·  28 Jun 2020
0

Hello everybody!
I stumbled across the project today and installed the system in-house. We want to use the system for nuget packages from different departments.
There are also chocolatey packages in the administration team. Since chocolatey is currently using the v2 nuget API the package installation is currently not working.
Chocolatey will not implement the v3 API in the near future.
There is an open issue https://github.com/chocolatey/choco/issues/508 from chocolatey.
At BaGet I found an open merge request https://github.com/loic-sharma/BaGet/pull/294 that would allow the use of Chocolatey.
Is it possible to check and merge the merge request?

jpylypiw picture jpylypiw  ·  22 Jul 2020
Source: Link