Unable to Upload Files from GitLab through CI/CD to Nexus Raw Repositories

361 views
Skip to first unread message

Vinod Kumar Wudali

unread,
Mar 31, 2021, 3:43:44 PM3/31/21
to Nexus Users

Hi All,

I am trying to upload files into raw repositories created in the Nexus using curl command from GitLAB CI/CD, I am getting the below error :
Invoke-WebRequest : A positional parameter cannot be found that accepts
argument '--upload-file'.
 
The same curl command when manually run from the command prompt it is working fine ( Files are getting uploaded).
I have tried even removing the alias in the power shell, but no luck,
Requesting you to help on this.

Brian Fox

unread,
Mar 31, 2021, 3:46:50 PM3/31/21
to Vinod Kumar Wudali, Nexus Users
That error is coming from Curl or from Gitlab, not from Nexus (which would be at the other end of the http connection). Specifically, you wouldn't get Nexus complaining about command line argument parsing since Nexus doesn't have a command line.

--
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 view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/242a2cd1-ce71-4955-beec-237a9177bc2an%40glists.sonatype.com.

Vinod Kumar Wudali

unread,
Mar 31, 2021, 3:49:13 PM3/31/21
to Nexus Users, brianf, Nexus Users, Vinod Kumar Wudali
Yes , it is coming from GitLab. When i manually execute the curl command through the command prompt the files are getting uploaded into Nexus Raw repositories. But when i do through Gitlab i am getting this error. Can you please advise how to resolve this.

Brian Fox

unread,
Mar 31, 2021, 3:51:19 PM3/31/21
to Vinod Kumar Wudali, Nexus Users
On Wed, Mar 31, 2021 at 3:49 PM Vinod Kumar Wudali <vinodk...@gmail.com> wrote:
Yes , it is coming from GitLab. When i manually execute the curl command through the command prompt the files are getting uploaded into Nexus Raw repositories.

^^ indicates this isn't an issue from Nexus.

 
But when i do through Gitlab i am getting this error. Can you please advise how to resolve this.

You're asking the Nexus list about a Gitlab issue. Maybe someone will randomly know this but I don't.

bende...@gmail.com

unread,
Mar 31, 2021, 3:54:38 PM3/31/21
to Nexus Users, brianf, Nexus Users, vinodk...@gmail.com
From the error, it looks like GitLab is using Powershell, not curl (Invoke-WebRequest). I'd suggest checking the Powershell docs for which arguments should be used.
Reply all
Reply to author
Forward
0 new messages