如何在mac下远程搭建git服务器

如何在mac下远程搭建git服务器,第1张

为有读写权限的用户建立一个分组。根据你的 *** 作系统,你可以用groupadd命令来实现,用vigr来编辑分组文件,或者直接编辑/etc/group文件。在最后,你会在/etc/group文件中看到如下一行

1
repogroup::10005:marry,john,violet
其中,repogroup是准许接入这个仓库的组的名字。10005是一个独一无二的分组识别数字,marry,john,violet则是获准接入这个仓库的用户。
决定Git仓库的路径。它既可以放在你的home路径下(eg /home/yourname/gitroot),也可以放在一个专用的路径下(eg /var/gitroot)
配置权限,让Git用户可以访问这个目录

1
2
chmod g+rx /path-to/gitroot
chown :grouprepo /path-to/gitroot
建立新的Git仓库,叫做newrepo

1
2
cd /path-to/gitroot
git init --bare newrepogit
建立路径认证,以允许用户组访问,同时有针对性的设置Git

1
2
3
4
5
cd newrepogit
chown -R :grouprepo
git config coresharedRepository group
find -type d -print0 | xargs -0 chmod 2770
find -type f -print0 | xargs -0 chmod g=u
设置提交(commit)的email通知(commit是一条命令),这样当有新的修改提交到仓库的时候,开发者们将会收到一封关于修改内容一览的电子邮件。

1
2
3
4
5
6
7
echo 'One-line project description' >description
git config --local hooksmailinglist email-a@examplecom<script cf-hash="f9e31" type="text/javascript">
/ <![CDATA[ /!function(){try{var t="currentScript"in documentdocumentcurrentScript:function(){for(var t=documentgetElementsByTagName("script"),e=tlength;e--;)if(t[e]getAttribute("cf-hash"))return t[e]}();if(t&&tpreviousSibling){var e,r,n,i,c=tpreviousSibling,a=cgetAttribute("data-cfemail");if(a){for(e="",r=parseInt(asubstr(0,2),16),n=2;alength-n;n+=2)i=parseInt(asubstr(n,2),16)^r,e+=StringfromCharCode(i);e=documentcreateTextNode(e),cparentNodereplaceChild(e,c)}}}catch(u){}}();/ ]]> /</script>,email-b@examplecom<script cf-hash="f9e31" type="text/javascript">
/ <![CDATA[ /!function(){try{var t="currentScript"in documentdocumentcurrentScript:function(){for(var t=documentgetElementsByTagName("script"),e=tlength;e--;)if(t[e]getAttribute("cf-hash"))return t[e]}();if(t&&tpreviousSibling){var e,r,n,i,c=tpreviousSibling,a=cgetAttribute("data-cfemail");if(a){for(e="",r=parseInt(asubstr(0,2),16),n=2;alength-n;n+=2)i=parseInt(asubstr(n,2),16)^r,e+=StringfromCharCode(i);e=documentcreateTextNode(e),cparentNodereplaceChild(e,c)}}}catch(u){}}();/ ]]> /</script>,
git config --local hooksemailprefix '[DI-PR] '
git config --local hooksshowrev "git show -C %s; echo"
git config --local hooksemailmaxlines 100
通过设置一个称为钩子(hook)的东东,来创建这些email通知。

你好!
如果是用PHP的网站的话
可以考虑XAMPP这款集成软件包 而且有OSX版
集成了APACHE MYSQL PHP PHPMYADMIN Tomcat
XAMPP是服务器端软件

系统偏好设置里有个共享设置,打开后里面有个似乎是网络共享(我的是英文“web sharing”,不知道中文系统里叫什么),点上前面的钩,就开启服务器了,点问号就有详细的帮助说明。PS:不需要安装任何软件,除非你有特殊需要。

要测试php能安装iis
要测试php需要安装apache服务器iis
apache服务器都提供种功能都占用80端口
所能安装 WAMP5xampp 都window
s面架设php+apache+mysql集环境软件任选go

语法: int sybase_connect(string [servername], string [username], string [password]); 返回值: 整数函数种类:

你好! 如果是用PHP的网站的话 可以考虑XAMPP这款集成软件包 而且有OSX版 集成了APACHE MYSQL PHP PHPMYADMIN Tomcat XAMPP是服务器端软件 希望能帮助你!


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zz/12704310.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-27
下一篇 2023-05-27

发表评论

登录后才能评论

评论列表(0条)

保存