Error using generateadminapikey.bat with Octane 12.55(CP7) 12.60 (CP8) on Windows

  • KM03282828
  • 06-Nov-2018
  • 09-Oct-2019

Summary

Using the generateadminapikey.bat in Octane on Windows results in an error

Error

'curl' is not recognized as an internal or external command,
operable program or batch file.
GOTO was unexpected at this time.

Cause

curl is not installed with Octane and is needed to generate the API key

Fix

Method A - The easy way

  1. Download the curl binarary from here: curl.zip
  2. Extract the curl.zip on the Windows server where Octane is installed. Make sure the path has no spaces. For example: C:\Temp\curl
  3. Navigate into the extracted "curl" folder, into the "bin" folder where the "curl.exe" is located.
  4. Copy the curl.exe to the ~\octane\install folder (commonly - C:\octane\install\)
  5. Run the command as documented, for example: generateadminapikey.bat http://myoctaneserver.mydomain.com:8080 my.user@mydomain.com mypassword

         It should generate the client_id and client_secret which will appear something like this...

        "client_id":"micro-services-key_l374yzq7154dlf7nmng68ynwg"
        "client_secret":"brh(8_TIN90i$i20VbWCumIh"


Method B - The more involved way

  1. Download the curl binarary from here: curl.zip
  2. Extract the curl.zip on the Windows server where Octane is installed. Make sure the path has no spaces. For example: C:\Temp\curl
  3. Navigate into the extracted "curl" folder, into the "bin" folder where the "curl.exe" is located. For example: C:\Temp\curl\bin\ - Make a note of this path.
  4. Open the generateadminapikey.bat for editing
  5. Locate the string "curl -k --cookie". This will be in two places.
  6. Add a path to the "curl" noted in Step 3 before the word "curl". For example: C:\Temp\curl\bin\curl
  7. The string should look something like: 'C:\Temp\curl\bin\curl -k --connect-timeout....
  8. Save the changes

    To Generate the API key run the generateadminapikey.bat <octane_server> <user> <password>

        For example: generateadminapikey.bat http://myOctane:8080 mary.smith@mydomain.com R00tR00t

        It should generate the client_id and client_secret which will appear something like this...

        "client_id":"micro-services-key_l374yzq7154dlf7nmng68ynwg"
        "client_secret":"brh(8_TIN90i$i20VbWCumIh"