Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitea 安装 #66

Open
iliuyt opened this issue Sep 23, 2020 · 0 comments
Open

gitea 安装 #66

iliuyt opened this issue Sep 23, 2020 · 0 comments

Comments

@iliuyt
Copy link
Owner

iliuyt commented Sep 23, 2020

简介

Gitea是一个极易安装,运行非常快速,安装和使用体验良好的自建 Git 服务。我们采用Go作为后端语言,这使我们只要生成一个可执行程序即可。并且他还支持跨平台,支持 Linux, macOS 和 Windows 以及各种架构,除了x86,amd64,还包括 ARM 和 PowerPC

image

官网

https://docs.gitea.io/zh-cn/

使用场景

gitea 适用于创业团队、兼职团队、个人开发者,特性为快速搭建,使用方便,功能非常垂直,没有繁杂的功能。对机器的要求也很低,非常适合个人开发者。

安装gitea

docker-compose 脚本

version: "3"

services:
  gitea:
    image: gitea/gitea:1.11.8
    container_name: gitea
    restart: always
    volumes:
      - ./data:/data
    ports:
      - "3000:3000"
      - "22:22"

启动docker

docker-compose up -d

web 安装

我这里只修改了Gitea基本URL和SSH服务域名,另外因为我是个人用户,禁用了openid登陆和用户注册。
我是个人用户,所以默认使用了sqllite作为数据库。
最后点击立即安装,约10秒后就安装成功了。
image
image

遇到的一些坑

gitea最新版本bug

gitea最新版本有bug,提交代码后,web端不显示提交内容,目前使用1.11.8没有发现问题

端口配置

ssh服务端口填写宿主机端口,如果docker映射为1022:22,那么ssh服务端口为1022
http服务端口填写docker端口,如果docker映射为3033:3000 ,那么http服务端口为3000
image

22端口

如果docker映射的端口为22很可能与宿主机的22端口冲突,导致ssh失效,所以要先更改ssh端口,为了安全建议宿主机不要使用22端口进行ssh登陆,docker也可以不使用映射22端口,但gitea部署后,使用ssh下载,url会变成ssh://,不好看
image

@iliuyt iliuyt changed the title gitea 记录 gitea 安装 Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant