Skip to content

Commit 5992365

Browse files
GiteaBotthigg
andauthored
added ssh mirror workaround description (#26096) (#26136)
Backport #26096 by @thigg related #1635 #18159 This will probably be obsolete at some point, but it should not break anything and it may help some users Co-authored-by: thigg <[email protected]>
1 parent 3b518a3 commit 5992365

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/content/doc/usage/repo-mirror.en-us.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,16 @@ To set up a mirror from Gitea to Bitbucket, you need to follow these steps:
9292
4. Select **Add Push Mirror** to save the configuration.
9393

9494
The repository pushes shortly thereafter. To force a push, select the **Synchronize Now** button.
95+
96+
### Mirror an existing ssh repository
97+
98+
Currently gitea supports no ssh push mirrors. You can work around this by adding a `post-receive` hook to your gitea repository that pushes manually.
99+
100+
1. Make sure the user running gitea has access to the git repo you are trying to mirror to from shell.
101+
2. On the Webinterface at the repository settings > git hooks add a post-receive hook for the mirror. I.e.
102+
103+
```
104+
#!/usr/bin/env bash
105+
git push --mirror --quiet [email protected]:username/repository.git &>/dev/null &
106+
echo "GitHub mirror initiated .."
107+
```

0 commit comments

Comments
 (0)