Notes of Using Gogs
Gogs 使用方法
服务启动方式
设置
将gogs/script/init/debian/gogs
复制到/etc/init.d/gogs
为保证http方式下文件推送大小权限,需要调整http服务器设置:
Solution for nginx
Just load your nginx.conf and add:
client_max_body_size 1024m;
(changing the value to your needs) in the http block.
Reload nginx to accept the new config by executing sudo service nginx reload and try again to push your commit over http.
Solution for Apache
In your httpd.conf add:
LimitRequestBody 52428800
(changing the value to your needs ) inside a
使用
sudo /etc/init.d/gogs restart|stop|start
权限设置
组织(Organization)
- 在
http://git.drwater.net
创建organization,如:ORGAN1
- 如有必要,在系统中创建
group
:ORGAN1
- 在
$GOGS_HOME
文件夹下执行:
sudo chmod -R 2770 ORGAN1
sudo chown -R git:[ORGAN1] ORGAN1
用户
- 在
http://git.drwater.net
创建个人仓库,如:PROJ1
- 如有必要,在系统中创建用户:
USERNAME
- 在
$GOGS_HOME/$USERNAME
文件夹下执行:
sudo chmod -R 2770 ORGAN1
sudo chown -R git:[USERNAME] PROJ1