Getting md5/sha1 from nexus artifact

1,152 views
Skip to first unread message

Mahesh Pawar

unread,
Jun 19, 2017, 3:41:23 AM6/19/17
to Nexus Users
Hey,
  I am using
 Nexus 3.0,3.3.1  Platform: Linux, Repos/Artifacts: Non-Maven. Scripting: only Python, Curl.

  I need to get md5/sha1 of a Nexus artifact/file without downloading it.
 As Nexus 3 don't support Rest calls, is there another way to do so.

i tried
1. curl -v -u 'username:Password' -H "Accept:application/json" "http://nexusIP/repository/Raw_1/abc.tar?describe=info"
2.  curl -u username:Password -v -4 http://nexusIP:8081/repository/Raw_1/Easy_Note_Bigger_2.tar >> file

But no success, I get other details as metadata but not md5/sha1.

Any help is appreciated.

Thanks in advance

Peter Lynch

unread,
Jun 20, 2017, 3:07:54 PM6/20/17
to Mahesh Pawar, Nexus Users
On Mon, Jun 19, 2017 at 4:41 AM, Mahesh Pawar <mahesh....@gmail.com> wrote:
Hey,
  I am using
  Nexus 3.0,3.3.1   Platform: Linux, Repos/Artifacts: Non-Maven. Scripting: only Python, Curl.

  I need to get md5/sha1 of a Nexus artifact/file without downloading it.

Why? Use Case?
 
  As Nexus 3 don't support Rest calls, is there another way to do so.

Can you upload the sha1 file when you upload the tar? Then later only download the sha1.  

i tried
1. curl -v -u 'username:Password' -H "Accept:application/json" "http://nexusIP/repository/Raw_1/abc.tar?describe=info"
2.   curl -u username:Password -v -4 http://nexusIP:8081/repository/Raw_1/Easy_Note_Bigger_2.tar >> file

But no success, I get other details as metadata but not md5/sha1.

Any help is appreciated.

Thanks in advance

--
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/8b4957bf-cc12-48c3-9fbe-c46c7575579c%40glists.sonatype.com.

Grierson, David

unread,
Jun 21, 2017, 8:53:31 AM6/21/17
to Peter Lynch, Mahesh Pawar, Nexus Users

We have a similar use of this function – our particular use-case is to include the artifact MD5 checksum on release notes.

 

This way the recipients of the release note know whether or not the artifact which was released is the artifact which they've downloaded from Nexus, or whether it has been replaced by a new copy of the artifact.

 

Dg.

 

From: nexus...@glists.sonatype.com [mailto:nexus...@glists.sonatype.com] On Behalf Of Peter Lynch
Sent: 20 June 2017 20:08
To: Mahesh Pawar <mahesh....@gmail.com>
Cc: Nexus Users <nexus...@glists.sonatype.com>
Subject: Re: Getting md5/sha1 from nexus artifact

 

On Mon, Jun 19, 2017 at 4:41 AM, Mahesh Pawar <mahesh....@gmail.com> wrote:

Hey,
  I am using
  Nexus 3.0,3.3.1   Platform: Linux, Repos/Artifacts: Non-Maven. Scripting: only Python, Curl.

  I need to get md5/sha1 of a Nexus artifact/file without downloading it.

 

Why? Use Case?

 

  As Nexus 3 don't support Rest calls, is there another way to do so.

 

Can you upload the sha1 file when you upload the tar? Then later only download the sha1.  


i tried
1. curl -v -u 'username:Password' -H "Accept:application/json" "http://nexusIP/repository/Raw_1/abc.tar?describe=info"
2.   curl -u username:Password -v -4 http://nexusIP:8081/repository/Raw_1/Easy_Note_Bigger_2.tar >> file

But no success, I get other details as metadata but not md5/sha1.

Any help is appreciated.

Thanks in advance

--
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.

 

--

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.

Information in this email including any attachments may be privileged, confidential and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you have received it in error, please notify the sender by return e-mail and delete it from your system. You should not reproduce, distribute, store, retransmit, use or disclose its contents to anyone. Please note we reserve the right to monitor all e-mail communication through our internal and external networks. SKY and the SKY marks are trademarks of Sky plc and Sky International AG and are used under licence.

Sky UK Limited (Registration No. 2906991), Sky-In-Home Service Limited (Registration No. 2067075) and Sky Subscribers Services Limited (Registration No. 2340150) are direct or indirect subsidiaries of Sky plc (Registration No. 2247735). All of the companies mentioned in this paragraph are incorporated in England and Wales and share the same registered office at Grant Way, Isleworth, Middlesex TW7 5QD.
Reply all
Reply to author
Forward
0 new messages