update README
This commit is contained in:
parent
5838118829
commit
535cb6d67e
42
README.md
42
README.md
|
@ -1,46 +1,44 @@
|
|||
|
||||
# g2g
|
||||
Tested on Alpine-Linux with Gitea server.
|
||||
|
||||
|
||||
Simple Gitea hook / service who mirroring all your Gitea repo to Github (with git push --mirror).
|
||||
*Tested only on Alpine-Linux with Gitea server. *
|
||||
|
||||
|
||||
Tested only on Alpine-Linux with Gitea server.
|
||||
The script requires bash, jq, curl, grep and git.
|
||||
|
||||
|
||||
This should be easily adapted to other distributions without too many modifications, it should certainly be necessary to modify the location where the cronjob is installed (/etc/periodic/15min) for Debian/Arch/... based system.
|
||||
|
||||
|
||||
BE VERY CAREFUL !!, if a Github repo already exists with the same name as a Gitea repo but with different content, the whole Github repository will be overwritten !.
|
||||
**BE VERY CAREFUL !! :
|
||||
If a Github repo already exists with the same name as a Gitea repo but with different content, the whole Github repository will be overwritten !**
|
||||
|
||||
|
||||
How the hook is triggered :
|
||||
- Every 15min, a cronjob install the hook in the repos of the configured <user>.
|
||||
- Every 15min, a cronjob launches the synchronization of the whole <user> repo (git push --mirror).
|
||||
- When a Gitea depo receives a push, the hook (.hooks/post-receive.d/github_mirror) is triggered and start the synchronization on Github.
|
||||
|
||||
### How the hook is triggered :
|
||||
|
||||
What does the script do :
|
||||
- Clone your Gitea repositories on Github.
|
||||
- Automatically create a new repository on Github if it does not exist.
|
||||
- Synchronize the description.
|
||||
- Synchronize the stat (private/public) of the repository.
|
||||
- Every 15min, a cronjob install the hook in the repos of the configured .
|
||||
- Every 15min, a cronjob launches the synchronization of the whole repo (git push --mirror).
|
||||
- When a Gitea depo receives a push, the hook (.hooks/post-receive.d/github_mirror) is triggered and start the synchronization on Github.
|
||||
|
||||
### What does the script do :
|
||||
|
||||
What the script doesn't do :
|
||||
- Does not manage several different accounts.
|
||||
- Do not delete any Github repo (if you delete a Gitea repo, you will have to do it manually on Github).
|
||||
- Does not synchronize anything from Github to Gitea.
|
||||
- Clone your Gitea repositories on Github.
|
||||
- Automatically create a new repository on Github if it does not exist.
|
||||
- Synchronize the description.
|
||||
- Synchronize the stat (private/public) of the repository.
|
||||
|
||||
### What the script doesn't do :
|
||||
|
||||
(The creation of Github repositories and the retrieval of information from Gitea repositories is done through the official API with curl).
|
||||
- Does not manage several different accounts.
|
||||
- Do not delete any Github repo (if you delete a Gitea repo, you will have to do it manually on Github).
|
||||
- Does not synchronize anything from Github to Gitea.
|
||||
|
||||
*(The creation of Github repositories and the retrieval of information from Gitea repositories is done through the official API with curl).*
|
||||
|
||||
|
||||
#### Install
|
||||
```
|
||||
apk add bash jq curl grep
|
||||
wget https://git.rokin.in/Rokin/gitea2github/raw/branch/master/g2g.sh
|
||||
cp -f g2g.sh /usr/bin/g2g
|
||||
chown root:root /usr/bin/g2g
|
||||
chmod 755 /usr/bin/g2g
|
||||
g2g service install
|
||||
|
|
Loading…
Reference in New Issue