shell - rsync 命令因詹金而失败
问题描述
在尝试从 macOS Catalina 终端执行 rsync 命令时,我能够成功地将数据从卷复制到本地驱动器
这是正在使用的命令
rsync -avxhPE /Volumes/pathtofolder/assets/. ./assets
但是同样的命令在 Jenkins 中不起作用。我收到以下错误。
+ rsync -avxhPE /Volumes/pathtofolder/assets/. ./assets
19:28:22 building file list ...
19:28:24 0 files...
rsync: opendir "/Volumes/pathtofolder/assets/." failed: Operation not permitted (1)
19:28:24 1 file to consider
19:28:24 ./
19:28:24
19:28:24 sent 83 bytes received 26 bytes 43.60 bytes/sec
19:28:24 total size is 0 speedup is 0.00
19:28:24 rsync error: some files could not be transferred (code 23) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-54/rsync/main.c(996) [sender=2.6.9]
19:28:24 Build step 'Execute shell' marked build as failure
19:28:24 Finished: FAILURE
解决方案
运行的用户jenkins
没有读取目录的权限。检查这一行:
rsync: opendir "/Volumes/pathtofolder/assets/." failed: Operation not permitted (1)
推荐阅读
- javascript - Grid.MVC 将选定的列数据发送到控制器
- python - 如何确定用于在 Windows 中启动我的 python 脚本的方法?
- docker - 如何将共享卷或共享映像推送到 ECR
- css - Safari 不会渲染字体,但在 chrome 中
- tfs - 是否可以为自定义变量设置条件?
- php - 在 Google Analytics 中调用 reports->batchGet 时 PHP 停止运行(?)
- getstream-io - 当 activity_count 大于 N 时限制聚合提要返回
- c++ - CStdioFile 句柄泄漏
- laravel - 使用 Axios 和 Laravel 上传图片时出现问题
- javascript - 无法在单击时绑定动态生成的输入单选