How to Set Up a Git Server with SSH on Windows

Part 1 of 2:

Install and Set Up Cygwin

  1. How to Set Up a Git Server with SSH on Windows Picture 1
    First, install Cygwin from its website.
  2. How to Set Up a Git Server with SSH on Windows Picture 2
    Then install git and OpenSSH packages, either from the links provided or from within Cygwin's setup utility.
  3. How to Set Up a Git Server with SSH on Windows Picture 3
    Configure OpenSSH:
    1. Open cygwin terminal as admin
    2. Type in 'ssh-host-config -y'
    3. At the end it will create a default user named 'cyg-server' and ask you a new password for that user.
    4. When finished, type in 'net start sshd' to start the openssh server.
  4. How to Set Up a Git Server with SSH on Windows Picture 4
    Make sure your install is working as follows:
    1. Open cygwin terminal as admin
    2. Type 'git' to see if git is working.
    3. type 'ssh cyg-server@localhost' to see if you are able to communicate with the server.
Part 2 of 2:

Git Operations with the Server

  1. How to Set Up a Git Server with SSH on Windows Picture 5
    On your other computer, you can git ssh the server by specifying 'cyg_server@ip_adress_of_open_ssh_server'.
    1. Example to do on the other machine:
      1. Open git bash and check if openssh server is reachable with the command 'ssh cyg_server@cyg_server@ip_adress_of_open_ssh_server'. If it asks for your password, then you are all set up. Otherwise recheck Part 1 instructions.
      2. Open git bash inside the repository you want to push.
      3. add remote with 'git remote add myRemote ssh://cyg_server@ip_adress_of_open_ssh_server/~/git/remote.git'
      4. push with 'git push MyRemote master'
4.2 ★ | 5 Vote

May be interested

  • How to Install Windows Server 2008Photo of How to Install Windows Server 2008
    windows server 2008 is a closed source operating system released february 4, 2008 based on windows vista. it has extended support until the 14th january 2020.it is available in both 32 and 64 bit versions but will be the last 32 bit...
  • How to Create a Windows Server 2012 R2 DomainPhoto of How to Create a Windows Server 2012 R2 Domain
    in most corporate environments, to accomplish certain tasks inexpensively and quickly, you need a domain. you can configure a windows server 2012 r2 server to host a domain, and when the configuration completes, the server is called a...
  • How to Install, Configure, and Test Windows Server 2012 R2Photo of How to Install, Configure, and Test Windows Server 2012 R2
    windows server 2012 r2 operating system has features that support domain enterprise networks of varying sizes, but to realize the benefits of these features, you must first install, configure, and test it. create the operating system...
  • How to Install phpMyAdmin on Your Windows PCPhoto of How to Install phpMyAdmin on Your Windows PC
    this wikihow teaches you how to install the phpmyadmin program on your windows computer. you can use phpmyadmin to control a mysql server from within a web browser, but to do so you must first have a mysql server set up on your computer....
  • 6 best bots to improve Discord serverPhoto of 6 best bots to improve Discord server
    there is so much to love about discord. you can use and manage this tool for free. besides, discord has voip support and thanks to bot support, it also has pretty good customization.
  • How to secure SSH serverPhoto of How to secure SSH server
    secure ssh connection helps you protect linux system and data. system administrators and home users also need to keep computers accessible from the public internet. here are 10 easy ways to help protect your ssh server.