英文:
Mirroring a Gitlab or Github repo to a selfhosted Gitea server
问题
以下是翻译好的内容:
"Good day all.
I am trying to mirror Git repositories, in full, for various OpenSource Projects that I am forking for my clients, in order to customizations.
These are the steps I am following:
$ git clone --mirror https://github.com/pathto/project.git
$ cd project.git
$ git remote set-url --push origin git@git.localserver.net:pathto/project
$ git push --mirror
And that last step I get a ! [remote rejected] on everything. (pre-receive hook declined)
I have setup the repository on Gitea and I have a SSH key installed. Everything uploads but then errors spits out for everything after the upload is complete.
My final step is to have a daily cron that does a fetch from github/gitlab and then a push to the local server."
英文:
Good day all.
I am trying to mirror Git repositories, in full, for various OpenSource Projects that I am forking for my clients, in order to customizations.
These are the steps I am following:
$ git clone --mirror https://github.com/pathto/project.git
$ cd project.git
$ git remote set-url --push origin git@git.localserver.net:pathto/project
$ git push --mirror
And that last step I get a ! [remote rejected] on everything. (pre-receive hook declined)
I have setup the repository on Gitea and I have a SSH key installed. Everything uploads but then errors spits out for everything after the upload is complete.
My final step is to have a daily cron that does a fetch from github/gitlab and then a push to the local server.
答案1
得分: 2
我通过阅读 Gitea 手册弄清楚了。
Gitea 具有内置的仓库镜像功能,支持推送和拉取两个方向。在组织内,不需要创建仓库,只需创建一个迁移并按照向导操作即可。
它会为您完成一切。
英文:
I figured it out by Reading the Gitea manual.
Gitea has built-in repository mirroring, in both the push and the pull directions. Inside the organization, instead of creating a repository, create a migration and just follow the wizard.
It does everything for you.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论