Comments (5)
同步后我们使用了 git-http-backend 提供服务。
from tunasync-scripts.
git-http-backend
tunasync-scripts 里有对应的脚本吗?
from tunasync-scripts.
没有相关脚本,这是官方工具。您可能需要配置 nginx 或 apache 以使用该工具
from tunasync-scripts.
安装依赖
sudo apt install -y git gitweb highlight fcgiwrap
git代码存放位置
/share/filedir/git
修改/etc/gitweb.conf
$projectroot = "/share/filedir/git/";
nginx.conf
location ~ /git(/.*) {
root /usr/share/gitweb;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend;
# export all repositories under GIT_PROJECT_ROOT
fastcgi_param GIT_HTTP_EXPORT_ALL "";
fastcgi_param GIT_PROJECT_ROOT /share/filedir/git;
fastcgi_param PATH_INFO $1;
}
mirror-web代码修改
_data/options.yml
添加ohmyzsh.git的说明以及强制使用help页面
mirror_desc:
- name: ohmyzsh.git
desc: ohmyzsh 的源码仓库
force_redirect_help_mirrors:
- ohmyzsh.git
git.sh修改
复制一份git.sh到/app/scripts/git.sh
需要对启动的代码做简单修改,git clone后面不跟--mirror
worker.conf增加一个任务
[[mirrors]]
name = "ohmyzsh.git"
provider = "command"
command = "/app/scripts/git.sh"
upstream = "https://github.com/ohmyzsh/ohmyzsh.git"
size_pattern = "size-pack: ([0-9\\.]+[KMGTP])"
interval = 1440
[mirrors.env]
TUNASYNC_WORKING_DIR = "/data/mirrors/git/ohmyzsh.git"
同步代码
tunasynctl reload -w mirror_work
/bin/tunasynctl start -w mirror_work ohmyzsh.git
重启nginx
service fcgiwrap restart
nginx -t
nginx -s reload
参考
https://gist.github.com/mcxiaoke/055af99e86f8e8d3176e
但是还存在问题:
只能用git clone项目,不能用浏览器浏览git项目,也不能直接下载git项目里的文件。
from tunasync-scripts.
只能用git clone项目,不能用浏览器浏览git项目,也不能直接下载git项目里的文件。
目前 TUNA 就是这个行为,不能用浏览器浏览项目,也不能直接下载文件。
如果您需要上述功能,您可以使用别的后端。
from tunasync-scripts.
Related Issues (20)
- [linuxbrew-bottles] Failed to download resource "[email protected]" HOT 1
- no using issue which can be delete by owner HOT 3
- 有没有好的方法用yum_sync将整个站点脱下来包含该版本所有rpm包 HOT 2
- 请问下tunasync使用docker时候在workers文件传入参数有哪些 HOT 9
- Use createrepo_c to replace createrepo
- Large amount of read io while running nix-channels.py
- PVE 7.0 发布了,请求添加proxmox中bullseye版本的同步 HOT 1
- LLVM 同步没有支持 debian 11 (Bullseye)
- nix-channel GC: dangling narinfo files HOT 1
- add nvidia channel?增加 nvidia channel? HOT 1
- cloud/pytorch 缺少osx-arm64目录
- 请问pub.sh中的命令是怎么安装的? HOT 1
- git-recursive脚本同步git仓库时,工作不正常 HOT 3
- How to set "TUNASYNC_WORKING_DIR" as a customize download folder HOT 1
- Request and RFC for add Lean4 mirrors
- github-release脚本未能获取到所有release
- Detail example when use yum-sync.py HOT 3
- 能添加如何使用 tunasync-scripts 的说明吗? HOT 1
- atp-sync.py现在还能正常使用吗,我自定义下载ubuntu 的focal的main仓库,客户段使用这个下载好的私有仓库报错。 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tunasync-scripts.