1

I am trying to establish git version control between my local machine (windows 10) and server machine (windows server 2008 in the same LAN). I knew that the following link has given some details on how to push git to remote server: https://gist.github.com/jkubicek/410050

But I just CAN NOT get the following command work:

"scp -r $TEMPREP $REPLOGIN@$REPADDRESS:$REPLOCATION/"

There were always errors, saying " SSH connect to host IPaddress port 22: Connection refused. I knew it had something to do with SSH.

My client local machine installed the hyper terminal integrated with git bash. I ran ssh command, it showed ssh client has been installed. I also set up the SSH authentication for Git bash in my client side machine: https://gist.github.com/bsara/5c4d90db3016814a3d2fe38d314f9c23

For server side machine ( windows server 2008), I installed git bash without hyper terminal, run git bash integrated with windows cmd. I checked "ssh localhost" in my server side, nothing came out. I searched the internet, someone said the openssh-server was already installed with git bash.

I ran "ssh-keygen -t rsa" in client side machine and tried to run: "ssh-copy-id username@hostname", it had the error "ssh: connect to host mbam port 22: connection refuse."

My question here are:

  1. Has openssh-server been installed with git bash in my server machine(windows server 2008) if I installed git bash on it? How can I check if openssh-server has been in my server machine?
  2. If the problem is the port number, how can I reset the port number to correct one so that I can build up client-server connection for git version control?
  3. Do I need credential information such as password in my ssh connection? If so, how can I do that? I searched the internet, someone said using sshpass to add credential for scp command. But I don't know how to install sshpass in my client side with hyper terminal with git bash.
  4. It looks like using git to do version control between my local computer and my remote server is much complicated than subversion control which only used some file to store credential information on server side and client side can send file to server side with saved password.
  5. Is there any simple windows based git program to so the git version control between client side machine and remote server machine?

Thanks in advance

hyperandey
  • 31
  • 3
  • "I searched the internet, someone said the openssh-server was already installed with git bash." you don't have to guess - verify it's running and listening on 22 with `netstat`. If it is running, make sure you configured your firewall to allow the incoming connections – erik258 Oct 06 '22 at 22:39
  • Git needs an ssh client, so Git-for-Windows comes with an ssh client in case your system does not have one. Git does *not* need an ssh server, so it does not come with one. – torek Oct 07 '22 at 20:53

1 Answers1

0

Is there any simple windows based git program to so the git version control between client side machine and remote server machine?

The simplest option is to establish a shared folder on the server machine (windows server 2008 in the same LAN), that you can contact from your local machine.

No HTTPS, no SSH required, direct access to a shared folder in which you can initialize a bare repository and push to it directly from your local machine.
However, it means no authentication through protocol (you can set the NTFS permissions on the target share though)

If you still want to use SSH, then Git is not directly involved.
Check the client prerequisites.
And make sure the server has a running OpenSSH server.

Once a ssh -Tv remoteAccount@remoteServer is working, then you can use it as part of a Git repository URL.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250