win8.1 搭建本地git 服务

1.下载 openSSH v10.0

2.下载  Git for Windows

3. 建一个裸仓库(--bare

mkdir D:\www\git-server
cd D:\www\git-server
git init --bare demo.git # 裸仓库,不带工作区

4. 分配权限

icacls "D:\www\git-server" /grant "git:(OI)(CI)F" /T

icacls "D:\www\git-server\demo.git" /grant "git:(OI)(CI)F" /T

 

5. 本地克隆仓库
git clone file:///D:/www/git-server/mlc-site-v5-web.git 

使用file,而不是ssh 不然一直提示
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.


posted @ 2025-12-18 02:53  gentsir  阅读(2)  评论(0)    收藏  举报