git-syncer

command module
v0.0.0-...-9c6d46d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

README

git-syncer

go-report contributors size languages file used-by license release download last-release

Usage

目标仓库可以不存在,但是存在的仓库必须关闭分支保护或者将分支保护配置为允许强制推送

Install git-syncer

you can download the latest binary release here

Install from source
go get github.com/DockerContainerService/git-syncer
cd ${GOPATH}/github.com/DockerContainerService/git-syncer
make all
Get usage information
[root@tencent ~]# ./git-syncer -h
Usage:
  git-syncer [flags]

Flags:
  -c, --config string           config file
  -d, --debug                   enable debug mode
  -h, --help                    help for git-syncer
      --privateKeyFile string   private key file
  -p, --proc int                numbers of worker (default 5)
  -r, --retries int             times to retry failed task (default 3)
Usage example
{
  "git@github.com:DockerContainerService/git-syncer.git": "git@172.17.162.204:demo/git-syncer.git"
}
$ ./git-syncer -c test.json 
[2023-05-11 19:54:55]  INFO Generate task syncTask-git-syncer.git: git@github.com:DockerContainerService/git-syncer.git => git@172.17.162.204:demo/git-syncer.git
[2023-05-11 19:54:55]  INFO Run task syncTask-git-syncer.git: git@github.com:DockerContainerService/git-syncer.git => git@172.17.162.204:demo/git-syncer.git
[2023-05-11 19:55:20]  WARN Retry task syncTask-git-syncer.git, times 1
[2023-05-11 19:55:45]  WARN Retry task syncTask-git-syncer.git, times 2
[2023-05-11 19:56:10]  WARN Retry task syncTask-git-syncer.git, times 3
[2023-05-11 19:56:35] ERROR Run task syncTask-git-syncer.git git@github.com:DockerContainerService/git-syncer.git => git@172.17.162.204:demo/git-syncer.git err: dial tcp 172.17.162.204:22: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
[2023-05-11 19:56:35]  INFO Finished, 0 task succeeded, 1 task failed. failed task list:

syncTask-git-syncer.git: git@github.com:DockerContainerService/git-syncer.git => git@172.17.162.204:demo/git-syncer.git, err: dial tcp 172.17.162.204:22: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Star History

Star History Chart

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL