====== Gogs ====== [[https://try.gogs.io/|Gogs]]是基于Go语言的自助Git服务,使用它可以快速搭建一个类似与[[https://github.com/|GitHub]]的[[wp>git|Git]]仓库托管服务。类似的服务有[[wp>gitlab|GitLab]]。 官方提供了二进制、Docker、Vagrant,以及包管理器等安装方式。得益于Golang的跨平台性,Gogs能跑在[[raspberrypi|RaspberryPi]]上 ===== Install ===== 1. 下载[[https://gogs.io/docs/installation/install_from_binary.html|编译好的二进制包]]; 2. 如果数据库使用的是[[postgresql|PostgreSQL]]或者[[mysql|MySQL]],则安装对应的数据库; 3. 使用[[systemd|systemd]]管理gogs进程; [Unit] Description=Gogs After=syslog.target After=network.target After=postgresql.service redis-server.service [Service] # Modify these two values and uncomment them if you have # repos with lots of files and get an HTTP error 500 because # of that ### #LimitMEMLOCK=infinity #LimitNOFILE=65535 Type=simple User=git Group=git WorkingDirectory=/home/git/gogs ExecStart=/home/git/gogs/gogs web Restart=always Environment=USER=git HOME=/home/git [Install] WantedBy=multi-user.target 4. 重启 gogs 进程。 sudo systemctl restart gogs ===== Upgrade ===== - 下载最新版的压缩包; - 删除当前的 templates 目录; - 解压压缩包并将所有内容复制粘贴到相应(当前)的位置。 ===== Reference ===== * [[https://try.gogs.io/|Gogs]] * [[https://www.digitalocean.com/community/tutorials/how-to-set-up-gogs-on-ubuntu-14-04|How To Set Up Gogs on Ubuntu 14.04 | DigitalOcean]]