创建管理员账户 例如:git

使用git账户登录

开启git账户的远程登陆

创建仓库文件夹

sudo git --bare init

更改配置文件

cd /Users/userName/projects

sudo vim .git/config 

mac 布置 git仓库服务器

vim操作教程

~1,进入vim后如果你没有在键盘上按过其它按键的话。可以先按下键盘上shift+g;(会让光标移动到文本的最后一行的行头。)

~2,按一下o键;(在当前行下面插入一行并进入输入模式)

~3,添加

 

[receive]
    denyCurrentBranch = ignore

更改仓库文件夹的目录权限

cd .. && sudo chmod -R 777 projects

连接服务器

 

git clone git_user@192.168.1.XX:testgit test

相关文章:

  • 2022-12-23
  • 2021-04-10
  • 2021-10-08
  • 2021-04-16
  • 2022-01-25
  • 2022-02-13
猜你喜欢
  • 2021-06-11
  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
  • 2022-01-07
  • 2021-12-27
  • 2021-12-16
相关资源
相似解决方案