8
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Github Actionsでgradleコマンドの実行がPermission deniedになる

8
Posted at

この記事は?

GitHubActionsでgradleを使用してビルドを行ったときにPermission deniedとなってしまいました。
本記事ではその時にどのように解決したかについて紹介します。

対応方法

gradleコマンドの実行の前に下記の通りgradlewに実行権限を付与してあげることで実行することができるようになります。

      - name: Make gradlew executable
        run: chmod +x ./gradlew

ちなみに

最初これで解決しようとしました。

      - name: Build
        run: sudo ./gradlew build

この場合は以下のようにエラーがでてしまうので対応できませんでした。
sudo: ./erp/gradlew: command not found

原因を深く追求はしていませんが、この対応方法ではだめなのようです

おわりに

Github Actionsを使っている記事がそもそも少なく、案外始めるにも大変だなと思いましたが、はまりどころを解消すれば簡単にCIできて良いなと思いました。

8
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?