how to make a chocolatey.org proxy work?

485 views
Skip to first unread message

Rui Lopes

unread,
Nov 8, 2016, 9:56:08 AM11/8/16
to Nexus
Hello,

I'm trying to create a netget proxy for the chocolatey.org community feed. For that, I've used this groovy snippet:

  // create a chocolatey proxy repository backed by the default blob store.
  repository.createNugetProxy("chocolatey.org-proxy", "https://chocolatey.org/api/v2/", "default")

But when I tried to use it from nuget it didn't work:

  nuget install notepad2 -Source http://localhost:8081/repository/chocolatey-proxy/



Nexus does not seem to produce any log entries about this, maybe I need to enable the verbose mode? I've enabled the TRACE level in the ROOT and on org.sonatype.nexus.httpclient.outbound loggers, but that didn't seem to do any difference, as I didn't see any info there. So I'm kinda lost and need your help to troubleshoot this.

-- RGL

PS Directly accessing the feed worked fine:

  nuget install notepad2 -Source https://chocolatey.org/api/v2/

Feeds used:

Attempting to gather dependency information for package 'notepad2.4.2.25.20160422' with respect to project '/home/vagrant', targeting 'Any,Version=v0.0'
Attempting to resolve dependencies for package 'notepad2.4.2.25.20160422' with DependencyBehavior 'Lowest'
Resolving actions to install package 'notepad2.4.2.25.20160422'
Resolved actions to install package 'notepad2.4.2.25.20160422'
Acquiring lock for the installation of notepad2 4.2.25.20160422
Acquired lock for the installation of notepad2 4.2.25.20160422
Installing notepad2 4.2.25.20160422.
Completed installation of notepad2 4.2.25.20160422
Adding package 'notepad2.4.2.25.20160422' to folder '/home/vagrant'
Added package 'notepad2.4.2.25.20160422' to folder '/home/vagrant'
Successfully installed 'notepad2 4.2.25.20160422' to /home/vagrant

Rui Lopes

unread,
Nov 8, 2016, 9:59:20 AM11/8/16
to Nexus
I forgot to mention, I'm using nexus 3.0.0 and 3.1.0, and both behave the same.

Rich Seddon

unread,
Nov 8, 2016, 10:31:51 AM11/8/16
to Nexus
I just tried it here using Nexus 3.1.0, and it worked with out issue, I can install notepad2 through a proxy repository whose remote is configured for https://chocolatey.org/api/v2/.

Check the nexus.log file, you'll likely find there is some network error.

Rich

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/CA%2BkzyB%2BoGRN59wixZSe3ifaDorZVD3S9Jv_bVZQJNxktEPuL2g%40mail.gmail.com.

Bradley Beck

unread,
Nov 8, 2016, 10:34:16 AM11/8/16
to Nexus
Rui,

I believe based on your usage of 'chocolatey.org-proxy' in your repo creation script you source URL will need to be 'http://localhost:8081/repository/chocolatey.org-proxy/'.

You can always copy the URL from the Repositories view in the UI to make sure you get the correct one.

Cheers,
-Brad

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.

Rui Lopes

unread,
Nov 8, 2016, 10:54:38 AM11/8/16
to Bradley Beck, Nexus
Oh, you are absolutely right, It was a typo on my part... It works perfectly! Sorry! and thank you for spotting it :-)

To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.

To post to this group, send email to nexus...@glists.sonatype.com.
Reply all
Reply to author
Forward
0 new messages