Plink在Jenkins中不起作用

问题描述 投票:0回答:1

我有一个包含plink的批处理脚本,用于加载现有的腻子会话并在unix服务器上运行一些命令。从windows命令行运行相同的批处理脚本很好,但是当我从Jenkins运行它时,它无法正常工作并提供以下输出。

PuTTY Link: command-line connection utility
Release 0.70
Usage: plink [options] [user@]host [command] ("host" can also be a 
PuTTY saved session name)
Options:
-v        show verbose messages
-load sessname  Load settings from saved session
 -ssh -telnet -rlogin -raw force use of a particular protocol (default 
SSH)
-P port   connect to specified port
-l user   connect with specified username
-m file   read remote command(s) from file
-batch    disable all interactive prompts
The following options only apply to SSH connections:
-pw passw login with specified password
-L listen-port:host:port   Forward local port to remote address
-R listen-port:host:port   Forward remote port to local address
-X -x     enable / disable X11 forwarding
-A -a     enable / disable agent forwarding
-t -T     enable / disable pty allocation
-1 -2     force use of particular protocol version
-C        enable compression
-i key    private key file for authentication
jenkins putty plink
1个回答
0
投票

我有同样的问题。我通过运行会话中存储的命令解决了该问题。例如,不要运行:

plink -load my-session

我改为使用

plink -serial \\.\COM9 -sercfg 115200,8,1,N,N

由于会话是按用户保存在Windows注册表中的,因此我认为Jenkins无法访问它们。

© www.soinside.com 2019 - 2024. All rights reserved.