用户:Fab/个人 aports 仓库
本页面旨在检查现有指南,以设置开发者仓库并将其发布在 git.alpinelinux.org。我使用 aports 仓库是因为这比仅仅在 git.alpinelinux.org 设置仓库需要更多配置。
git clone git://git.alpinelinux.org/aports.git
需要 SSH 访问 git.alpinelinux.org 和一些空间。
创建仓库
在您的本地系统上创建一个目录。
mkdir -p aports
初始化 git 仓库并创建首次提交
cd aports git init
创建裸仓库
将其克隆到裸仓库
cd .. git clone --bare aports aports.git
设置描述
echo "fab's aports repo" > aports.git/description
为 cgit 设置 section 和您的名字。
cat <<EOF >> aports.git/cgitrc section=Developer fab owner=Fabian Affolter EOF
上传到 git.alpinelinux.org
将内容复制到 git.alpinelinux.org 上您的 ~/cgit 目录。
scp -r aports.git git.alpinelinux.org:cgit/
清理
我们不再需要本地 aports.git 目录。
rm -rf aports.git
添加您的个人仓库
到目前为止,git 还不了解有关仓库的任何信息。
cd aports git config remote.origin.pushurl "ssh://git.alpinelinux.org/user/fab/aports"
添加上游源以合并
将原始源添加为 git 远程仓库(“upstream” 可以是您想为远程仓库指定的任何名称)
git remote add upstream git://git.alpinelinux.org/aports
填充您的仓库
现在,您的个人仓库可以用来自上游 aports 仓库的数据填充。
git pull upstream master
通过推送,仓库数据将被上传到 git.alpinelinux.org 托管的 git 仓库。
git push
现在一切都已准备就绪,可以制作 APKBUILD 文件了。