尝试从macOS Catalina终端执行rsync命令时,我能够成功地将数据从卷复制到本地驱动器
这是我正在使用的命令
rsync -avxhPE /Volumes/pathtofolder/assets/. ./assets
但是相同的命令在詹金斯中不起作用。正在收到以下错误。
+ 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
答案 0 :(得分:0)
运行jenkins
的用户无权读取目录。检查这一行:
rsync: opendir "/Volumes/pathtofolder/assets/." failed: Operation not permitted (1)
答案 1 :(得分:0)
这是macOS 10.15中新的用户隐私保护的结果。有关所有详细信息,请参见WWDC 2019会议701 Advances in macOS Security。作为用户,您可以通过将工具添加到
中的列表来授予对该工具的访问权限System Preferences > Security & Privacy > Privacy > Files and Folders.
分享和享受