CircleCI permission denied running bash script
Assuming you have already checked it in, use this command to flag it as executable to git:
git update-index --chmod=+x script.sh
reference: https://www.pixelninja.me/make-script-committed-to-git-executable/
Several possible problems:
- deploy.sh might not be marked as executable (
chmod +x deploy.sh
would fix this) - The first line of deploy.sh might not be a runnable shell...
If the first doesn't work, can we please see the contents of deploy.sh?
I was having the same issue. I added sh to the front of my commands section to get it to work.
deployment:
production:
branch: "master"
commands:
- sh ./deploy.sh
Hopefully that fix saves everyone sometime going forward.