Closed Lia-C closed 8 years ago
@Lia-C: File should be placed in Atlassian Stash home directory, not just in root. So path should be <atlassian-stash-home-dir>/external-hooks/test/checkpep8.sh
.
I am running a local stash server from a project called "stash-hooks", so there is a project "Project 1" and a repository inside of it, "rep_1", automatically created. "Rep_1" has the location on disk
/home/user/stash-hooks/target/stash/home/shared/data/repositories/1
.
I created the directory structure external-hooks/test inside of this path, and placed checkpep8.sh inside of test:
/home/user/stash-hooks/target/stash/home/shared/data/repositories/1/external-hooks/test/checkpep8.sh
However, when I use the above path in the "Executable:" field, I still get the error: Specified path is not executable file. Check executable flag.
I've also checked the permissions of checkpep8.sh: -rwxrw-r--
, so it is executable. How do I format the path so that I stop getting this error?
I see this error too since the last update from Stash to Bitbucket Server 4.1.3 :(
Moving the scripts to <atlassian-stash-home-dir>/external-hooks/
did not help.
@hrzbrg: Yesterday I performed upgrade to Bitbucket Server 4.1.3 and see no problems with hook. Do you use latest version of hook plugin? Can you provide ls -al
output of <atlassian-stash-home-dir>
and <atlassian-stash-home-dir>/external-hooks/
?
Arg, just saw the problem. Bitbucket Server Home is now /home/atlbitbucket
and not /home/atlstash
.
When I enter the full path /home/atlbitbucket/external-hooks/myscript.sh
it works fine :)
@hrzbrg: :+1:
I have a file at the following path:/external-hooks/test/checkpep8.sh
I put it in the "Executable:" field as "/test/checkpep8.sh" but I keep getting the error message that "Specified path is not executable file. Check executable flag."
I have Safe Mode enabled. I am logged in as the repo admin. I've also tried "./test/checkpep8.sh", "checkpep8.sh", and many other variants. I have also entered into the command line "chmod u+x checkpep8.sh" to make sure that the file is executable, but I still keep getting the error message that it is not executable.
What is wrong with the file I specified?