Gitlab Shell脚本权限被拒绝

时间:2020-10-13 05:26:17

标签: shell continuous-integration gitlab gitlab-ci pipeline

我正在使用Gitlab CICD运行一个简单的shell脚本,并且我获得了“拒绝权限”。请建议

我做chmod +x test.sh时说不允许操作。

stages:
  - build 

build: 
  stage: build 
  script: 
    - ls
    - ./test.sh

Shell test.sh

echo Hi

错误:

enter image description here

1 个答案:

答案 0 :(得分:0)

您必须:

1-运行isArchived

OR

2-将行bash ./test.sh添加到#!/bin/bash的顶部,以便它知道可以在bash中运行