curl: (3) unmatched brace in URL position 1

Viewed 136

I'm trying to run a gitlab job that has to run a curl command and store the output of this, in a file. I'm trying this to achieve that :

    upload: 
      stage: upload
      dependencies:
        - checkout
        - detect-mx-version
        - build
    
      needs: [ "checkout", "detect-mx-version", "build" ]  
      before_script:
        - apk add curl
        - apk add jq
    
    script:  
       - >
         curl -v -F "file=@/<<LOCATION_OF_PACKAGE>>.mda" -X POST -H "Username: ${PROJECTS_SVN_USER}" -H "ApiKey: ${API_KEY}" "https:<<URL_TO_BE_UPLOADED/upload?name=${BRANCH}-${REVISION}-${CI_PIPELINE_ID}.mda" 
          {
            read body
            read code
            echo $code
            echo $body
          } >> out.json

but when i run this i get an error :

curl: (3) unmatched brace in URL position 1: { ^

What am I doing wrong here? I tried escaping the double quotes in my command as well, it did not help.

0 Answers
Related