Prevent redeploys on raw repository

210 views
Skip to first unread message

Dave H

unread,
Jun 29, 2017, 2:38:39 PM6/29/17
to Nexus Users
We make extensive use of raw repositories, uploading artifacts via Curl.  Those repos configured with allow reploy = false still allow redeploys!  Is this a bug or is there something I need to do here.

Thanks,
Dave

jt...@sonatype.com

unread,
Jun 29, 2017, 2:54:10 PM6/29/17
to Nexus Users
Hi Dave,
This is working for me when I checked using "curl -v --user 'admin:admin123' --upload-file ./ticketlist.txt http://localhost:8081/repository/rawhosted1/ticketlist.txt".
Is your curl different?  If you want to share it, I can try what you're doing.
I am certainly no curl master, but I see it blocking redeploys when I use the above.
Hope that helps,
Joe

Dave H

unread,
Jun 29, 2017, 3:14:40 PM6/29/17
to Nexus Users
Hi Joe,  

Here's my command:

curl -u uname:mypass -i -o upload.log -T server-jre-8u131-linux-x64.tar.gz "https://repo.mycorp.edu/repository/binaries/java/jre/8u131-b11/lnx64/"

Dave H

unread,
Jun 29, 2017, 3:18:24 PM6/29/17
to Nexus Users
Ah --- I found the issue -- here is my upload.log file:


HTTP/1.1 100 Continue

HTTP/1.1 400 Repository does not allow updating assets: binaries
Server: nginx/1.11.6
Date: Thu, 29 Jun 2017 19:17:04 GMT
Content-Length: 0
Connection: keep-alive
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff


Weird that the curl command itself goes through all the trouble of finishing the upload and silently failing...

Bradley Beck

unread,
Jun 29, 2017, 3:56:19 PM6/29/17
to Dave H, Nexus Users
Also, you likely want to include the artifact name itself in the upload URL, e.g.

Otherwise, you will end up with an asset at the path "binaries/java/jre/8u131-b11/lnx64/", which is likely not what you intended.

--
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.
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/b33eedfb-b5d2-444d-bdd3-4b0c3856f7a6%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.

Dave H

unread,
Jul 5, 2017, 1:36:48 PM7/5/17
to Nexus Users, david....@gmail.com
Good tip - made that change and it helps...
Reply all
Reply to author
Forward
0 new messages