git-sync: sync private repo, clone success, sync always error

Run on k8s. ref ssh.md v3.1.2 wait=10

I sync a private repo on github. clone success, but sync always have error.

I0911 06:22:02.033890       1 main.go:269]  "level"=0 "msg"="starting up"  "args"=["/git-sync","-ssh","-repo=git@github.com:xxx/xxx","-branch=master","-depth=1","-wait=10","-max-sync-failures=100"]
I0911 06:22:14.301324       1 main.go:489]  "level"=0 "msg"="cloned repo"  "origin"="git@github.com:xxx/xxx"
I0911 06:22:14.305088       1 main.go:409]  "level"=0 "msg"="syncing git"  "hash"="2875e71b10e97409fb466e484d0406860909b8d0" "rev"="HEAD"
I0911 06:22:24.620860       1 main.go:433]  "level"=0 "msg"="added worktree"  "branch"="origin/master" "path"="/tmp/git/rev-2875e71b10e97409fb466e484d0406860909b8d0"
I0911 06:22:24.632092       1 main.go:453]  "level"=0 "msg"="reset worktree to hash"  "hash"="2875e71b10e97409fb466e484d0406860909b8d0" "path"="/tmp/git/rev-2875e71b10e97409fb466e484d0406860909b8d0"
E0911 06:24:17.901433       1 main.go:299]  "msg"="unexpected error syncing repo, will retry" "error"="error running command: exit status 128: \"fatal: Could not read from remote repository.\\n\\nPlease make sure you have the correct access rights\\nand the repository exists.\\n\""
I0911 06:24:17.901549       1 main.go:300]  "level"=0 "msg"="waiting before retrying"  "waitTime"=10000000000

and I try to exec in the pod, rm the repo(rev-xxxx and dest). Watch the log clone success, sync also have error.

I0911 06:38:50.484497       1 main.go:476]  "level"=0 "msg"="git root exists and is not empty (previous crash?), cleaning up"  "path"="/tmp/git"
I0911 06:38:59.023319       1 main.go:489]  "level"=0 "msg"="cloned repo"  "origin"="git@github.com:xxx/xxx"
I0911 06:38:59.034301       1 main.go:409]  "level"=0 "msg"="syncing git"  "hash"="2875e71b10e97409fb466e484d0406860909b8d0" "rev"="HEAD"
I0911 06:39:04.997677       1 main.go:433]  "level"=0 "msg"="added worktree"  "branch"="origin/master" "path"="/tmp/git/rev-2875e71b10e97409fb466e484d0406860909b8d0"
I0911 06:39:05.010356       1 main.go:453]  "level"=0 "msg"="reset worktree to hash"  "hash"="2875e71b10e97409fb466e484d0406860909b8d0" "path"="/tmp/git/rev-2875e71b10e97409fb466e484d0406860909b8d0"
E0911 06:39:15.060726       1 main.go:299]  "msg"="unexpected error syncing repo, will retry" "error"="error running command: exit status 128: \"fatal: Could not read from remote repository.\\n\\nPlease make sure you have the correct access rights\\nand the repository exists.\\n\""
I0911 06:39:15.060839       1 main.go:300]  "level"=0 "msg"="waiting before retrying"  "waitTime"=10000000000

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 29 (14 by maintainers)

Most upvoted comments

I confirm, syncing from private repo (Gitlab) is stuck at: I0110 16:06:49.775577 10 main.go:507] "level"=0 "msg"="updating submodules"

The data of the main repo is correctly cloned (as I can preview in the console)