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.
Hi @viwudali
There is no curl in Powershell. However, Microsoft included an alias called curl pointing to Invoke-WebRequest Cmdlet. Parameter --upload-file is not supported by Invoke-WebRequest.
On your command line it most likely works, because you actually have a curl installed locally and configured environment to use it.
When using Powershell I suggest to use native Powershell Cmdlets.
sorry @viwudali but I am not that familiar with Powershell. However, I believe you can use your favorite search engine to find how to upload files with Powershell.