New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sync to external repo #96
Comments
You can use mirror repo feature: http://obahua.com/setup-your-private-git-hosting-with-gogs/#mirrorrepository . |
Yes, but this mirrors from external to gogits, but i want from gogits to external... |
I see... yeah, |
Just curious, what's the case? |
I want to push to one place and mirror for failover to guthub and bitbucket. =) |
what if push failed to github when somehow commits are behind? how to deal with it? |
Write somewhere error about it and stop to mirrors before user not fix this things. |
maybe, sync is two operation, I think.
|
Definitely push only, user has to fix conflicts when fail to push |
Webhook has been done, but users need to receive message when fail to sync external. So this feature still need delay for implementing message system. |
ping, as i see gogs have email notify system, so we can use it to notify user about errors.. |
this related to #1623 |
After reading some blog posts of mirroring external git repos to github, I think this is possible. Sadly, I did not get it to work. About GitHub mirrors told us that we can use However, what blocked me from achieving this is that gogs seem not to store its repos as ordinary git repos. Now, when I say 'ordinary git repos', I mean we can see its status via I wonder how gogs manipulates git operations without storing the repo in the ordinary form. @unknwon do you have any example of how to write a |
Wow. Thanks for sharing this post. So after reading that post I've managed to solve this via the
From now on, all gogs repo on the same server should be able to be mirrored to external git services like github, by using the |
You can achieve that by manually push once.. |
Yes, but not much people would do it as |
Any news? |
This can be sidestepped by changing StrictHostKeyChecking. While that answer is for using SSH manually, you can also set SSH options for Git. I'd also be very happy to see this implemented :) |
+1 for this feature |
+1 for this feature please! Would be good to have my own Gogs hosted Git repo available on GitHub when needed. |
+1 |
+1 for this feature. Also I want to sync to gitlab.com |
+1 |
1 similar comment
+1 |
two way mirror |
Create a first draft for .drone.yml
+1 |
Guys, if you just want to vote for this feature, you might want to add your reaction to the first comment of this issue. You can react with 👍 and many other emojis. |
Hmm, why isn't |
Are you using Gogs as Git user? |
I just wanted to mention that the checklist provided by @dalu works so flawlessly that it ought to be part of the official gogs documentation! Is there any way we can alert the documentation maintainers? |
You can also use a personal access token with repo access, and then your post-receive hook like so: #!/bin/bash
git push --mirror https://<token>@github.com/<user>/<repo>.git |
Thats's just my strategy to have repos synced, but it does no work from the browser, only with client |
Hmm yeah, but it is known issue in #4338, so we just need to wait patiently :) FWIW, it works in gitea (commits from UI, as well as making branches on UI) |
Here is a simple how-to for stupid people: On your Gogs server:
On your Github account:
On your Gogs project page:
On any computer containing a clone, run:
A stupid guy. |
@unknwon Just want to point out that all 3 hooks currently exposed through front-end are server side hooks. None of them are invoked when a merge happens through pull request. |
@xiayhub hmm... ? The known problem is custom hooks are not called when use web editor, not default ones. You may need to file a formal issue report with more details. |
@unknwon , I tried getting around this by manually installing I'll open an issue. |
Fyi, you can also use https and a token. On github, generate a token: https://github.com/settings/tokens Then the git hook becomes: #!/bin/bash This way you don't need to mess with ssh keys. Of course, anyone who can see the git hooks in gogs, can see the token.. so be careful. |
Is that possible to create ability to do external sync from gogits for example to giithub and bitbucker and other services?
I thinks that no need much work...
The text was updated successfully, but these errors were encountered: