如何更改Gitlab变量的CHMOD?
我的部署阶段失败了,只有那条线
chmod og= $STAGE_ID_RSA
得到了错误,
chmod og= $STAGE_ID_RSA
BusyBox v1.34.1 (2022-04-04 10:19:27 UTC) multi-call binary.
Usage: chmod [-Rcvf] MODE[,MODE]... FILE...
MODE is octal number (bit pattern sstrwxrwxrwx) or [ugoa]{+|-|=}[rwxXst]
-R Recurse
-c List changed files
-v Verbose
-f Hide errors
ERROR: Job failed: exit code 1
我读了 gitlab ci/cd Pipeline错误 但是我在gitlab服务器上没有.ssh(位于其他服务器上)。 如何更改文件内容权限?
My deploy stage failed,just that line
chmod og= $STAGE_ID_RSA
Got error
chmod og= $STAGE_ID_RSA
BusyBox v1.34.1 (2022-04-04 10:19:27 UTC) multi-call binary.
Usage: chmod [-Rcvf] MODE[,MODE]... FILE...
MODE is octal number (bit pattern sstrwxrwxrwx) or [ugoa]{+|-|=}[rwxXst]
-R Recurse
-c List changed files
-v Verbose
-f Hide errors
ERROR: Job failed: exit code 1
I read this
Gitlab CI/CD pipeline error
but I do not have .ssh on Gitlab server(located on other server).
How to change file content permission?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查是否将“ stage_id_rsa”保存为Gitlab的变量配置页面上的“文件”非“变量”。
check if "STAGE_ID_RSA" is saved as "file" not "variable" on the gitlab's variable configuration page.
对我来说,问题只是将变量仅设为受保护,这意味着它们仅在受保护的分支中可见。管道的选定分支未设置为受保护,因此ID_RSA密钥的变量(绝对必须作为文件设置)无法获得相同的结果。
来解决问题
或
For me the problem was simply setting the variables as protected only, which means they are only visible for protected branches. The selected branch for the pipeline was not set to protected and so the variable for the ID_RSA key (which definitely has to get set as a file) was not available leading to the same result.
I did solve the problem by
or