网址
安装
- 先直接启用exe,配置app.ini
- 使用nssm install mygitea安装exe作为服务
.ssh/config配置
Host github.com
User git
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
Host gitea
User git
Hostname ssh.mypc.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 22
app.ini
server
修改成下面的server的配置,这样可以避免下面的一些错误
- Bad owner or permissions on ssh config file
- Permission denied (publickey,password).
[server]
SSH_DOMAIN = ssh.mypc.com
DOMAIN = ssh.mypc.com
HTTP_PORT = 3601
ROOT_URL = http://ssh.mypc.com:3601/
SSH_LISTEN_HOST = ssh.mypc.com
SSH_DOMAIN = ssh.mypc.com
SSH_ROOT_PATH = C:\Users\spike\.ssh
START_SSH_SERVER = true
SSH_KEYGEN_PATH = C:\Users\spike\.ssh\keygen
ssh_key_test_path=C:\Users\spike\.ssh\temp
APP_DATA_PATH = D:\program\gittea\data
DISABLE_SSH = false
SSH_PORT = 22
LFS_START_SERVER = true
LFS_JWT_SECRET = FY-sGDktYv29TYD_VbRRMxerxvwrYEIG256V0pZ2cxea
OFFLINE_MODE = true
FORCE_TRUST_SERVER_CERT = true
代理
配置代理后就可以克隆github中的仓库到本地
PROXY_ENABLED = true
PROXY_URL = https://127.0.0.1:7890
PROXY_HOSTS = *.github.com
测试命令
ssh -Tv gitea
过程截图
不需要的window openssh
不需要的ssh生成
普通生成即可,不需要指定ed25519
ssh-keygen -t ed25519 -C '[email protected]'