Hi Aravind,

Thank you very much for the response. Hopefully the below information will 
help. Let me know if you need more or something else.

I've been doing some more testing and believe I can reproduce the issue 
outside of GoCD with a script that defines the SSH_OPTS variable with 
values that have a space and then using that in my SSH command in the same 
script. This must be a known behavior with bash scripts, but I have yet to 
figure out how to get around it or find much documentation about how others 
work with this. I feel like this would be a pretty common scenario, but 
maybe I'm wrong.

JSON task...
{
  "command": "bash",
  "timeout": -1.0,
  "arguments": [
    "-c",
    "./src/main/config/scripts/wrapper.sh -h ${HOSTS_INT}"
  ],
  "run_if": "passed",
  "type": "exec"
}



Environment Variable
{
  "name": "SSH_OPTS",
  "value": "-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i 
/path/to/.ssh/my.pem"
}




On Sunday, January 5, 2020 at 6:03:23 AM UTC-5, Aravind SV wrote:
>
> Hello Chris, 
>
> On Fri, Jan 03, 2020 at 10:19:59 -0800, Chris Flynn wrote: 
> > It is definitely only an issue if the pipeline calls the Shell script 
> > directly. There is no issue if a secondary script is used. Also, another 
> > point of information, I'm configuring my pipelines in code as JSON. 
>
> Can you show a relevant snippet of the JSON, to understand how you're 
> configuring the task (and maybe the env vars)? 
>
> Thanks, 
> Aravind 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/5f2f25e3-6061-48a7-a1a9-5475c655cc0b%40googlegroups.com.

Reply via email to