gpt4 book ai didi

gradle - 为什么当我对 gradle 项目使用 github actions CI 时,我会遇到 "./gradlew: Permission denied"错误?

转载 作者:行者123 更新时间:2023-12-02 09:24:55 29 4
gpt4 key购买 nike

我有一个非常简单的 gradle 项目,当我设置 GitHub Actions CI 时,我遇到此错误:

Run ./gradlew clean dependencies
./gradlew clean dependencies
shell: /bin/bash -e {0}
env:
JAVA_HOME: /opt/hostedtoolcache/Java/8.0.222/x64
JAVA_HOME_8.0.222_x64: /opt/hostedtoolcache/Java/8.0.222/x64
/home/runner/work/_temp/8f29e484-fbb4-4e29-a02a-679519aec24c.sh: line 1: ./gradlew: Permission denied
##[error]Process completed with exit code 126.

最佳答案

我找到了答案!

我只需更改 git 存储库上的 gradlew 文件权限即可使用以下命令使其可执行:

git update-index --chmod=+x gradlew
git commit -m "Make gradlew executable"

这很简单,但浪费了我的时间!

关于gradle - 为什么当我对 gradle 项目使用 github actions CI 时,我会遇到 "./gradlew: Permission denied"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58282791/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com