Execute git pull command over ssh on window server hangs forever

Viewed 676

I have a windows server 2012 with bitvise ssh server installed on it, beside git and git bash, I have set up a virtual user and git it full permission over a folder contains a git repository (Let's call it GR). Now when I open the server via remove desktop connection and open GR folder using cmd and perform git pull everything works as expected and I get the latest commits. but When I connect to the server via ssh client and change the directory cd to GR folder and perform git pull the execution hangs forever and it's not working. I tried to change bitvise to PowerShell but I got the same result, so anyone could help me on how am I going to run git pull command over ssh on windows server.

Note: I change the ssh default port for windows server bitvise but It didn't work

2 Answers

Have you opened all the required ports on the server? Firewall traffic? you can try execute git pull --trace-ascii

This should give you some more overview hopefully.

I managed to solve the issue as follows:

  • Execute GIT_TRACE=1 which give me where the git command is stuck 19:07:59.137016 run-command.c:643 trace: run_command: git-credential-manager get
  • Now I knew that the ssh doesn't have access for window credential manager, so I need a way to provide the credentials inside git pull command, as I'm using GitLab I used git clone https://username:token@gitlab.com/user/repo.git
Related