Unable to run script


Trying to run the following script:

if [ -z "$1" ]
  echo "Which folder do you want to deploy to GitHub Pages?"
  exit 1
git subtree push --prefix $1 origin gh-pages

I get a permission denied when running ./gh-deploy.sh docs



The file probably misses executable attribute. Try running

chmod +x gh-deploy.sh

to make gh-deploy.sh file executable


Hey @shadowcodex,

Try @harutyun’s tip first and then…

I know it’s not best practice and I’ll likely get yelled at for recommending this but… just pop a sudo in there like: sudo ./gh-deploy.sh docs

I do it all the time… :blush:
(it’ll work…) :anguished:


Yeah that worked. Thanks so much!