Welcome to the Linux Foundation Forum!

Lab 7.1 Securing Jenkins Projects: Curl commands not working for me

I have started the test VM on my local machine and can access the Jenkins controller on "http://localhost:5000".

So while following the lab and trying to create folders within Jenkins using the curl commands provided, I am getting an error:

"Invoke-WebRequest : Cannot bind parameter 'Headers'. Cannot convert the "Content-Type:application/x-www-form-urlencoded" value of type "System.String" to type "System.Collections.IDictionary".
At line:1 char:211

  • ... 14212b316d8f4d7 \ -H "Content-Type:application/x-www-form-urlencoded"
  • ~~~~~~~~~~~~
    • CategoryInfo : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
    • FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.InvokeWebRequestCommand"

I tried to regenerate the access token twice but both times got the same error.

PS: OS - WINDOWS 10

Comments

Categories

Upcoming Training