Create a git server based on ssh under windows

这里的主要问题,是路径的问题,我们改变 default shell 来解决了这个问题
net start sshd
  • Install git for windows
这一步是为了
默认bash配置 和 创建仓库
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Program Files\Git\bin\bash.exe" -PropertyType String -Force
  • Create warehouse
随便拉一个 gitee、或者github的仓库下来本地 /e/work/project/user_guide
  • Pull repository
git clone pop@192.168.1.xx:/e/work/project/user_guide new
git clone username@ip:address
其中address 是 Git bash 中的地址

Guess you like

Origin blog.csdn.net/u011011827/article/details/131323699