diff options
Diffstat (limited to '')
-rw-r--r-- | content/blog/miscellaneous/mirroring-to-github.md | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/content/blog/miscellaneous/mirroring-to-github.md b/content/blog/miscellaneous/mirroring-to-github.md index c6b1fb2..ab42914 100644 --- a/content/blog/miscellaneous/mirroring-to-github.md +++ b/content/blog/miscellaneous/mirroring-to-github.md @@ -8,7 +8,7 @@ tags: ## Introduction -I have been running my own [git server]({{< ref "docs/adyxax.org/git.md" >}}) for more than 10 years (first with just ssh, then with [gitolite](https://gitolite.com/gitolite/index.html) and finally with [gitea](https://gitea.io/)). I manually pushed some of my work to github for better exposition and just decided to automate that mirroring. +I have been running my own [git server]({{< ref "docs/adyxax.org/git/_index.md" >}}) for more than 10 years (first with just ssh, then with [gitolite](https://gitolite.com/gitolite/index.html) and finally with [gitea](https://gitea.io/)). I manually pushed some of my work to github for better exposition and just decided to automate that mirroring. ## How to @@ -24,4 +24,6 @@ git push --mirror --quiet https://adyxax:TOKEN@github.com/adyxax/www.git &> /dev echo 'github updated' {{< /highlight >}} -Just put your token there, adjust the repository path and it will work. I am using this in `post-receive` hooks on my git server on several repositories without any issue. +Just put your token there, adjust your username and the repository path then it will work. I am using this in `post-receive` hooks on my git server on several repositories without any issue. + +Note that since Gitea 1.15 it is no longer necessary to do this with a post-receive hook, you can use the repository mirroring feature to achieve the same result. Use the url in the script above directly and it will work. |