Closed yevhene closed 6 years ago
Hi, does this work or not? afaik it does not work. the only mention of it anywhere is the above example and I haven't figured out how that shell script hooks into everything else yet in the code.
ok, i got this working by doing ssh_options: ['ForwardAgent=yes']
in my config. I'm not sure if the other way is deprecated, or doesn't work, or what. but this worked for me.
By itself ssh_options: ['ForwardAgent=yes']
doesn't work for me.
@joeadcock You need to look at current source code, but year ago, as I can remember, it was ssh_options: ['-o ForwardAgent=yes']
@yevhene Thank for the quick reply!
It was because the repo host wasn't in the known hosts. I can confirm that ssh_options: ['ForwardAgent=yes']
does indeed work.
i see that it's resolved. closing the issue.
@phra pm2-deploy
has dedicated forward_agent
option. And it was broken. And issue was about forward_agent
not ssh_options
. But I don't know how it is now.
@yevhene so sounds like a bug. should i reopen the issue? can you confirm that there is something broken?
Hello in 2019!
Like @yevhene said - there is a forward-agent
option in: https://github.com/Unitech/pm2-deploy/blob/4e9655c042fa43ea82506cf5f4fad583a880568d/deploy#L104
I would expect something like this to work:
{
// Agent forwarding
'forward-agent': true,
}
This does work @phra and it is broken.
However this works:
{
// Agent forwarding
'forward-agent': 'Yeah well forward that agent',
}
My guess: the function config_get
: https://github.com/Unitech/pm2-deploy/blob/4e9655c042fa43ea82506cf5f4fad583a880568d/deploy#L78
does not handle anything else but strings. And - yes ['ForwardAgent=yes']
does work.
I can confirm everything that @madflow said. Besides, the forward-agent
configuration isn’t mentioned in the documentation.
It is ignored
https://github.com/Unitech/pm2-deploy/blob/master/deploy#L99