简体   繁体   中英

Git version control and ssh connection between client (windows 10) - server (windows server 2008)

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 inte.net, 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 inte.net, 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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM