作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
<分区>
在 Hudson 中,我创建了一个作业,试图在 Ubuntu Hudson Slave 中执行此命令行:
sudo mount -t cifs //path/to/network/directory /path/to/local/directory -o username=<Account>,password=<AccountPassword>,domain=<DomaineName>
但是我得到了这个错误:
sudo: no tty present and no askpass program specified
然后,我尝试在 Hudson 作业中执行此命令行:
mount -t cifs //path/to/network/directory /path/to/local/directory -o username=<Account>,password=<AccountPassword>,domain=<DomaineName>
然后,我得到这个错误:
mount: only root can do that
然后我尝试了这个命令行(我试过是因为这个命令在 putty 中有效):
ssh "sudo mount -t cifs //path/to/network/directory /path/to/local/directory -o username=<Account>,password=<AccountPassword>,domain=<DomaineName>"
但我因这个错误 失败了:
ssh: Could not resolve hostname ,domain=<DomaineName>: Name or service not known
看完this我试图通过在 Ubuntu 终端中执行此命令行来解决之前的错误:
sudo chmod a+s /sbin/mount.cifs
但这并没有解决我的问题。
这也不起作用:
mount.cifs //path/to/network/directory /path/to/local/directory -o username=<Account>,password=<AccountPassword>,domain=<DomaineName>
我应该在 Hudson 作业中以 root 身份进行身份验证(密码应该自动设置)吗?或者我应该给 Hudson 用户 root 权限吗?
我该如何解决这个问题?
非常感谢!
我是一名优秀的程序员,十分优秀!