Pulling remote repository and pushing to another repository
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Vladimir Smagin e153e3e93c update modules 2 months ago
build/deb create DEBIAN if absent 6 months ago
vendor update modules 2 months ago
.gitignore update modules 2 months ago
Dockerfile add jenkins pipeline and package building 6 months ago
Jenkinsfile fix build 4 months ago
README.md Изменить 'README.md' 4 months ago
go.mod update modules 2 months ago
go.sum added log leveling 8 months ago
main.go 0.2.2 5 months ago
sync.yaml successfully running syncs 8 months ago
types.go successfully running syncs 8 months ago

README.md

go-git-mirror - git mirroring tool

With this tool you can pull remote repository and push to your local.

How to use it:

  • clone source repository to local sync directory, i.e. /var/lib/go-git-mirror/sync
  • create destination repository somewhere in your local network
  • create yaml config my_sync.yaml with auth info, sync directory and origins
  • run ./go-git-mirror -file ./my_sync.yaml

Binaries

Look to releases tab and download. Also you can use my Ubuntu\Debian repository http://deb.blindage.org.

Docker

Do not use it in production, this registry for temporary use until I find stable hosting. I hope domain will be same.

$> docker run --rm registry.blindage.org/go-git-mirror:0.2.2 go-git-mirror
11:52:08.788 main ▶ NOTICE 001 Git mirroring tool by Vladimir Smagin
11:52:08.788 main ▶ NOTICE 002 https://git.blindage.org/21h/go-git-mirror
Usage of go-git-mirror:
  -file string
    	Set sync filename
  -help
    	Show help
  -loglevel string
    	Set logging level (default "notice")

Build sources

Commandline options

  -file string
    	Set sync filename
  -help
    	Show help
  -loglevel string
    	Set logging level (default "notice")

Sample config file

Run ./go-git-mirror -file my_config.yaml

Sample config:

---
# set auth methods for git repositories
auth:
  - name: github
    username: git
    privateKeyPath: "/home/vlad/.ssh/mykey.pem"
    
  - name: gitea
    username: "vlad"
    password: "ZdravstvuyJopaNoviyGod"

# set sync units array
sync:
  - name: Sync my-pretty-library.git
    # path to cloned git repository in sync directory
    path: /var/lib/go-git-mirror/sync/my-pretty-library
    # set source origin and attach auth method
    source:
      repo: github.com:21h/my-pretty-library.git
      auth: "github"
    # set destination origin and attach auth method
    destination:
      repo: https://git.blindage.org/my-pretty-library.git
      auth: "gitea"

Copyright by Vladimir Smagin (21h) 2019
http://blindage.org email: 21h@blindage.org
Project page: https://git.blindage.org/21h/go-git-mirror