设置标签 ‘Gitweb’

给Gitweb加上访问密码,保护我们的私有项目

Gitweb是Git提供的一个基于web的版本查看工具,可以在网页浏览我们的版本库,挺像Google Code上面的网页浏览版本库。我们可以使用cgi方式,让gitweb运行在apache中,如果在nginx上,我们还需要一个包装才可以运行cgi。

使用Gitweb很方便,但是如果是一些私有的项目,谁都可以访问想必大家都不能接受吧。

所以我们可以通过apache或者nginx给虚拟主机增加一个密码。效果如:http://git.everet.org/

我们首先用htpasswd生成密码:

htpasswd -cb 文件名 帐号 密码

htpasswd -b 其他帐号 密码

-c代表创建一个新的,-b代表批处理。
阅读全文

Ubuntu使用Gitosis搭建Git服务器,Windows客户端支持中文

更详细的教程请见 《Pro Git》http://progit.org/book/zh/ch4-7.html

安装必备工具

apt-get install git gitweb gitosis

用自己的公钥来初始化Gitosis

root@everet:/var# sudo -H -u git gitosis-init < /tmp/authorized_keys
Initialized empty Git repository in /home/git/repositories/gitosis-admin.git/
Reinitialized existing Git repository in /home/git/repositories/gitosis-admin.git/

对该仓库中的post-update 脚本加上可执行权限

root@everet:/home/git/repositories/gitosis-admin.git/hooks# chmod 755 post-update

克隆 Gitosis 的控制仓库

$ git clone git@everet.org:gitosis-admin.git

这会得到一个名为 gitosis-admin 的工作目录,主要由两部分组成:

阅读全文

回到顶部

About Me

Cedric Porter is Stupid ET.
EverET.org is provided by Stupid ET.

我参与的作品

Scar
Imagination Factory
UltraDemo
众口味社交网站
QQ空间相册下载器
人人所有好友相册下载器
智能进化生态系统
FSM图形化编辑器

重要页面

Clover进度