构建机挂了,重新搭了Jenkins,发现原来脚本访问共享文件夹失败了,提示拒绝访问。
直接在构建机上访问该共享文件夹是ok的,用命令行互相拷贝文件也ok,那说明是Jenkins权限的问题,它没能获取系统已经保存的访问凭据。
解决方法很简单,让Jenkins显示地执行如下命令就ok了(假设远程目录是\192.168.1.100\www,用户名是yonghuming,密码是mima):
net use \\192.168.1.100\www “mima” /user:yonghuming
同样的道理,Jenkins进行SVN操作可能也会提示无法访问的问题,道理是一样的。
svn: E215004: Authentication failed and interactive prompting is disabled; see the --force-interactive option
svn: E215004: Unable to connect to a repository at URL 'https://svn/xxx'
svn: E215004: No more credentials or we tried too many times.
让Jenkins显示地指定svn用户名和密码就可以了,比如:
svn info --username yonghuming --password mima
其中,yonghuming和mima分别是svn目录的账号名和密码













网友评论