Skip to content

Commit

Permalink
added ssh mirror workaround description
Browse files Browse the repository at this point in the history
  • Loading branch information
thigg authored Jul 24, 2023
1 parent 4211efe commit c8a3512
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/content/doc/usage/repo-mirror.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,14 @@ To set up a mirror from Gitea to Bitbucket, you need to follow these steps:
4. Select **Add Push Mirror** to save the configuration.

The repository pushes shortly thereafter. To force a push, select the **Synchronize Now** button.

### Mirror an existing ssh repository
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.

1. Make sure the user running gitea has access to the git repo you are trying to mirror to from shell.
2. On the Webinterface at the repository settings > git hooks add a post-receive hook for the mirror. I.e.
```
#!/usr/bin/env bash
git push --mirror --quiet git@github.com:username/repository.git &>/dev/null &
echo "GitHub mirror initiated .."
```

0 comments on commit c8a3512

Please sign in to comment.