How to Set Up a Git Server with SSH on Windows
Setting up a git server with SSH on my LAN can be confusing. So many suggestions exist that you may get lost in it. This article will help you install Cygwin. This includes installing Cygwin on your Windows machine. First, install...
Table of Contents
Part 1 of 2:
Install and Set Up Cygwin
-
First, install Cygwin from its website. -
Then install git and OpenSSH packages, either from the links provided or from within Cygwin's setup utility. -
Configure OpenSSH:- Open cygwin terminal as admin
- Type in 'ssh-host-config -y'
- At the end it will create a default user named 'cyg-server' and ask you a new password for that user.
- When finished, type in 'net start sshd' to start the openssh server.
-
Make sure your install is working as follows:- Open cygwin terminal as admin
- Type 'git' to see if git is working.
- 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
-
On your other computer, you can git ssh the server by specifying 'cyg_server@ip_adress_of_open_ssh_server'.- Example to do on the other machine:
- 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.
- Open git bash inside the repository you want to push.
- add remote with 'git remote add myRemote ssh://cyg_server@ip_adress_of_open_ssh_server/~/git/remote.git'
- push with 'git push MyRemote master'
- Example to do on the other machine:
You've just finished reading the article "How to Set Up a Git Server with SSH on Windows" edited by the TipsMake team. You can save how-to-set-up-a-git-server-with-ssh-on-windows.pdf to your computer here to read later or print it out. We hope this article has provided you with many useful tech tips and tricks. You can search for similar articles on tips and guides. Thank you for reading and for following us regularly.
Read More
- Instructions for setting up and managing FTP Server on Windows 10
- Create VPN Server on Windows 8
- How to create a VPN server on Windows without using software?
- How to install DNS Server on Windows Server 2019
- How to connect to an FTP Server from Windows Explorer?
- History of Windows Server through versions
- Install Windows Server 2003 and create a backup server
- New update of Windows Server causes many serious errors
- Instructions for installing Windows Server 2016 on Windows 10
- What does Windows Server 2016 bring to small and medium businesses?
- Learn about Windows Server 2012 (Part 3)
- Recent Windows Server Updates Cause DNS Errors
- Configure Windows Server 2008 to remotely access SSL VPN Server (Part 3)
- How to install IIS in Windows Server 2012




