Details
-
Bug
-
Resolution: Fixed
-
Medium
-
2.0.0
-
None
Description
Context:
- Windows XP Pro SP2
- Git 1.7.9 installed with Cygwin
- STASH_HOME=D:\stash_home
When trying to push, I have this error:
Counting objects: 17, done. Delta compression using up to 2 threads. Compressing objects: 100% (9/9), done. Writing objects: 100% (9/9), 1.32 KiB, done. Total 9 (delta 5), reused 0 (delta 0) remote: hooks/pre-receive: line 6: exec: D:\stash_home\bin\git-hooks\hook-coordinator.sh: not found To ssh://git@git.domain.com:7999/PROJECT/repo.git ! [remote rejected] branch -> branch (pre-receive hook declined) error: failed to push some refs to 'ssh://git.domain.com:7999/PROJECT/repo.git'
The path is MS-DOS and exec doesn't expand it and cannot find it in the PATH.
By changing /cygdrive/d/stash_home/data/repositories/1/hooks/pre-receive to change path to UNIX format, my problem is solved:
#!/bin/bash #>******************************************************* # THIS FILE WAS AUTO-GENERATED BY ATLASSIAN STASH. # DO NOT MODIFY UNDER ANY CIRCUMSTANCE. #>******************************************************* exec $(cygpath "$STASH_HOOK_COORDINATOR") hooks/pre-receive.d "$@" <&0 >&1 2>&2
Idem for /cygdrive/d/stash_home/data/repositories/1/hooks/pre-receive.d/20_stash_callback, /cygdrive/d/stash_home/data/repositories/1/hooks/post-receive and /cygdrive/d/stash_home/data/repositories/1/hooks/post-receive.d/20_stash_callback
But I have to do it on every repository and it will be broken again on new repositories.
Attachments
Issue Links
- mentioned in
-
Page Loading...