The script must be executable. You can run chmod +x script.js, then commit and push it to git.
chmod +x script.js
Now try creating the project from template it should work.