gof3
gof3 is a Go package and a CLI that provides a single operation: mirroring. The origin and destination are designated by the URL of a forge and a path to the resource. For instance, mirror --from-type forgejo --from https://code.forgejo.org/f3/f3-cli-example --to-type filesystem --to /some/directory will mirror the f3-cli-example project in a local directory using the F3 format.
Table of content
Quick start
Install
- On an amd64 GNU/Linux Operating System
wget https://code.forgejo.org/f3/gof3/releases/download/latest/f3-cli ; chmod +x f3-cli
./f3-cli mirror -h
Example
From Forgejo To F3
Login to https://code.forgejo.org and obtain an application token with
read permissions at https://code.forgejo.org/user/settings/applications.
f3-cli mirror \
--from-type forgejo --from-forgejo-url https://code.forgejo.org \
--from-forgejo-token $codetoken \
--from-path /forge/organizations/f3/projects/f3-cli-example \
--to-type filesystem --to-filesystem-directory /tmp/f3-cli-example
From F3 to Forgejo
Run a local Forgejo instance and
get an application token with write permissions from the admin account.
f3-cli mirror \
--from-type filesystem --from-filesystem-directory /tmp/f3-cli-example \
--from-path /forge/organizations/f3/projects/f3-cli-example \
--to-type forgejo --to-forgejo-url http://0.0.0.0:3000 \
--to-forgejo-token $localtoken
Visit the project that was just created at http://0.0.0.0:3000/f3/f3-cli-example
License
This project is MIT licensed and all contributors are expected to agree with the DCO.
Funding
See the page dedicated to funding in the F3 documentation