my goal basically is:
I want to (automatically) update a local git-repository (on the windows-server) when changes are pushed into the origin repository (on the RHEL Server). I would like to use the 'git pull' command from the local repository to prevent the installation of extra software eg. rsync.
I issue the command from bash as follows:
ssh <user>@<server(windows)> "cd \\path\\to\\repository && git pull"
Reply:
dup() in/out/err failed
fatal: Could not read from remote repository. Please make sure you have the right access rights and the repository exists.
When I issue the command "git pull" on the windows server using the same user there are no problems.
Both git versions are up to date and a permission issue is unlikely because I issue the commands using the same user.
Here are the GIT_TRACE printouts
successful:
14:55:17.022804 exec_cmd.c:236 trace: resolved executable dir:C:/Program Files/Git/mingw64/bin
14:55:17.038415 git.c:344 trace: built-in: git pull
14:55:17.038415 run-command.c:640 trace: run_command: git fetch --update-head-ok
14:55:17.054036 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
14:55:17.054036 git.c:344 trace: built-in: git fetch --update-head-ok
14:55:17.054036 run-command.c:640 trace: run_command: unset GIT_DIR GIT_PREFIX; ssh <user>@<address>.system.local 'git-upload-pack '\''/opt/iam_repo/entwicklung/apa225543'\'''
14:58:06.232453 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
14:58:06.232453 git.c:344 trace: built-in: git pull
14:58:06.232453 run-command.c:640 trace: run_command: git fetch --update-head-ok
14:58:06.248078 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
14:58:06.248078 git.c:344 trace: built-in: git fetch --update-head-ok
14:58:06.248078 run-command.c:640 trace: run_command: unset GIT_DIR GIT_PREFIX; ssh <user>@<address>.system.local 'git-upload-pack '\''/opt/iam_repo/entwicklung/apa225543'\'''
14:58:06.435864 run-command.c:640 trace: run_command: git rev-list --objects --stdin --not --all --quiet
14:58:06.435864 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
14:58:06.435864 git.c:344 trace: built-in: git rev-list --objects --stdin --not --all --quiet
14:58:06.482460 run-command.c:640 trace: run_command: git unpack-objects --pack_header=2,3
14:58:06.482460 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
14:58:06.482460 git.c:344 trace: built-in: git unpack-objects --pack_header=2,3
14:58:06.498077 run-command.c:640 trace: run_command: git rev-list --objects --stdin --not --all --quiet
14:58:06.498077 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
14:58:06.513704 git.c:344 trace: built-in: git rev-list --objects --stdin --not --all --quiet
14:58:06.513704 run-command.c:1556 run_processes_parallel: preparing to run up to 1 tasks
14:58:06.513704 run-command.c:1588 run_processes_parallel: done
14:58:06.513704 run-command.c:640 trace: run_command: git gc --auto
14:58:06.529335 exec_cmd.c:236 trace: resolved executable dir:C:/Program Files/Git/mingw64/libexec/git-core
14:58:06.529335 git.c:344 trace: built-in: git gc --auto
14:58:06.529335 run-command.c:640 trace: run_command: git merge FETCH_HEAD
14:58:06.544974 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
14:58:06.544974 git.c:344 trace: built-in: git merge FETCH_HEAD
14:58:06.560579 run-command.c:640 trace: run_command: git gc --auto
14:58:06.560579 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
14:58:06.560579 git.c:344 trace: built-in: git gc --auto
unsuccessful:
14:59:42.561721 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
14:59:42.561721 git.c:344 trace: built-in: git pull
14:59:42.561721 run-command.c:640 trace: run_command: git fetch --update-head-ok
14:59:42.561721 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
14:59:42.577343 git.c:344 trace: built-in: git fetch --update-head-ok
14:59:42.577343 run-command.c:640 trace: run_command: unset GIT_DIR GIT_PREFIX; ssh <user>@<address>.system.local 'git-upload-pack '\''/opt/iam_repo/entwicklung/apa225543'\'''
15:19:32.440504 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
15:19:32.440504 git.c:344 trace: built-in: git pull
15:19:32.440504 run-command.c:640 trace: run_command: git fetch --update-head-ok
15:19:32.456129 exec_cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/libexec/git-core
15:19:32.456129 git.c:344 trace: built-in: git fetch --update-head-ok
15:19:32.456129 run-command.c:640 trace: run_command: unset GIT_DIR GIT_PREFIX; ssh <user>@<address>.system.local 'git-upload-pack '\''/opt/iam_repo/entwicklung/apa225543'\'''
It just seems to stop there.
I had IBM Secure Shell running. Replaced it with cygwin open ssh, now it works fine.