gogs 安装 git

https://blog.csdn.net/millerwang23/article/details/94552865  参考

切记 必须是git用户才可以执行

 

 

1 git直接 yum安装

安装gogs  安装在 /home/git/

    wget https://dl.gogs.io/0.12.2/gogs_0.12.2_linux_amd64.tar.gz

解压    sudo tar -zxvf  gogs_0.12.2_linux_amd64.tar.gz

进入目录gogs目录

后台启动

nohup ./gogs web &

tail -f nohup.out   

 

./gogs web 启动

启动不了看  进程 是不是被占用 还有防火墙

netstat -apn  | grep 3000

kill -9 12187  强制管进程

防火墙

vi /etc/sysconfig/iptables

service iptables restart    

/etc/init.d/iptables status

service iptables stop

 

配置 钩子

#!/bin/sh

Git --work-tree=/var/www/html/fwcgit --git-dir=/home/gogs-repositories/yiling/fwcgit.git checkout -f

 

 

域名配置

server {

    server_name qiuyang.com

    listen 80;

 

    location / {

        proxy_pass http://127.0.0.1:3000;

        proxy_set_header Host $host:80;

        proxy_set_header X-Real-IP $remote_addr;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    }

}

 

 

 

 

 

 

 

碰到的mysql 问题 删了数据的情况

mysql -u root -p  mysql进入

nginx -c /usr/local/etc/nginx/nginx.conf

nginx -s reload

 一些重启nginx错误

 ps -ef | grep  nginx

 pkill -9 nginx

 service nginx restart

 

 

git push到远程分支时报错error: RPC failed; HTTP 411 curl 22 The requested URL returned error: 411 Length Req

是用户没有权限   需要在gogs 后台添加用户

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值