Comments (6)
For some more context: we tried to test the same git-sync call (as far as is possible) against a private github repository (access token, using the main branch, same gitsync 4.x etc.), which worked without problem.
from git-sync.
I'm going to need you to post all of the flags that you used to try to reproduce this. We have a battery of end-to-end tests, so you must be doing something that I have not considered before.
Ideally, you could run your sink with '-v6' and post the full logs here. That will show me the command line arguments, which commands it executed and what the results of them were.
from git-sync.
Thanks for your answer! This is the command with all the flags we're using right now:
git-sync --repo=<GITLAB_REPO_URL> --ref=main --depth=1 --period=20s --link=current --root=/tmp/git --verbose=6 --git-config='safe.directory:/tmp/git,http.sslVerify:false'
The corresponding logs are:
{"logger":"","ts":"2024-08-28 07:55:52.215110","caller":{"file":"main.go","line":528},"level":0,"msg":"starting up","pid":8,"uid":1000,"gid":0,"home":"/stk","flags":["--add-user=false","--askpass-url=","--branch=","--change-permissions=0","--cookie-file=false","--credential=[]","--
{"logger":"","ts":"2024-08-28 07:55:52.215437","caller":{"file":"main.go","line":613},"level":2,"msg":"created private gitconfig file","path":"/tmp/git-sync.gitconfig.273869993"}
{"logger":"","ts":"2024-08-28 07:55:52.215497","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global gc.autoDetach false"}
{"logger":"","ts":"2024-08-28 07:55:52.218330","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"2.782773ms"}
{"logger":"","ts":"2024-08-28 07:55:52.218403","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global gc.pruneExpire now"}
{"logger":"","ts":"2024-08-28 07:55:52.226229","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"7.777354ms"}
{"logger":"","ts":"2024-08-28 07:55:52.226258","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global credential.helper \"cache --timeout 3600\""}
{"logger":"","ts":"2024-08-28 07:55:52.281476","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"55.179183ms"}
{"logger":"","ts":"2024-08-28 07:55:52.281576","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global core.askPass true"}
{"logger":"","ts":"2024-08-28 07:55:52.283900","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"2.274704ms"}
{"logger":"","ts":"2024-08-28 07:55:52.283958","caller":{"file":"main.go","line":1878},"level":5,"msg":"running command","cwd":"","cmd":"git config --global safe.directory *"}
{"logger":"","ts":"2024-08-28 07:55:52.286138","caller":{"file":"main.go","line":1878},"level":6,"msg":"command result","stdout":"","stderr":"","time":"2.134505ms"}
{"logger":"","ts":"2024-08-28 07:55:52.286173","caller":{"file":"main.go","line":1747},"level":1,"msg":"setting up git SSH credentials"}
{"logger":"","ts":"2024-08-28 07:55:52.286205","caller":{"file":"main.go","line":1892},"level":1,"msg":"setting additional git configs","configs":[{},{}]}
{"logger":"","ts":"2024-08-28 07:55:52.286244","caller":{"file":"main.go","line":1894},"level":5,"msg":"running command","cwd":"","cmd":"git config --global safe.directory /tmp/git"}
{"logger":"","ts":"2024-08-28 07:55:52.288334","caller":{"file":"main.go","line":1894},"level":6,"msg":"command result","stdout":"","stderr":"","time":"2.036647ms"}
{"logger":"","ts":"2024-08-28 07:55:52.288371","caller":{"file":"main.go","line":1894},"level":5,"msg":"running command","cwd":"","cmd":"git config --global http.sslVerify false"}
{"logger":"","ts":"2024-08-28 07:55:52.290286","caller":{"file":"main.go","line":1894},"level":6,"msg":"command result","stdout":"","stderr":"","time":"1.859783ms"}
{"logger":"","ts":"2024-08-28 07:55:52.290331","caller":{"file":"main.go","line":1558},"level":3,"msg":"syncing","repo":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-08-28 07:55:52.290346","caller":{"file":"main.go","line":1734},"level":1,"msg":"storing git credential","url":"<GITLAB_REPO_URL>"}
{"logger":"","ts":"2024-08-28 07:55:52.290433","caller":{"file":"main.go","line":1738},"level":5,"msg":"running command","cwd":"","cmd":"git credential approve"}
{"logger":"","ts":"2024-08-28 07:55:52.292093","caller":{"file":"main.go","line":1738},"level":6,"msg":"command result","stdout":"","stderr":"","time":"1.615245ms"}
{"logger":"","ts":"2024-08-28 07:55:52.292137","caller":{"file":"main.go","line":1093},"level":3,"msg":"repo directory exists","path":"/tmp/git"}
{"logger":"","ts":"2024-08-28 07:55:52.292153","caller":{"file":"main.go","line":1165},"level":3,"msg":"sanity-checking git repo","repo":"/tmp/git"}
{"logger":"","ts":"2024-08-28 07:55:52.292219","caller":{"file":"main.go","line":1176},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git rev-parse --show-toplevel"}
{"logger":"","ts":"2024-08-28 07:55:52.294117","caller":{"file":"main.go","line":1176},"level":6,"msg":"command result","stdout":"/tmp/git","stderr":"","time":"1.786947ms"}
{"logger":"","ts":"2024-08-28 07:55:52.294152","caller":{"file":"main.go","line":1189},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git fsck --no-progress --connectivity-only"}
{"logger":"","ts":"2024-08-28 07:55:52.381773","caller":{"file":"main.go","line":1189},"level":6,"msg":"command result","stdout":"","stderr":"notice: HEAD points to an unborn branch (git-sync)\nnotice: No default references","time":"87.575774ms"}
{"logger":"","ts":"2024-08-28 07:55:52.381819","caller":{"file":"main.go","line":1095},"level":4,"msg":"repo directory is valid","path":"/tmp/git"}
{"logger":"","ts":"2024-08-28 07:55:52.381837","caller":{"file":"main.go","line":1122},"level":5,"msg":"running command","cwd":"/tmp/git","cmd":"git remote get-url origin"}
{"logger":"","ts":"2024-08-28 07:55:52.384369","caller":{"file":"main.go","line":1122},"level":6,"msg":"command result","stdout":<GITLAB_REPO_URL>","stderr":"","time":"2.46834ms"}
{"logger":"","ts":"2024-08-28 07:55:52.384457","caller":{"file":"main.go","line":804},"msg":"too many failures, aborting","error":"readlink /tmp/git/current: invalid argument","failCount":1}
We are running git-sync in a sidecar container to our pod.
from git-sync.
It looks.like readlink() is legitimately failing.
Can you run ls -la /tmp/git
- what is the "current" item?
from git-sync.
Unfortunately our Container always crashes, so we can't do the command. In another container, that still uses v3 we get the following output:
from git-sync.
Can you run it with the container command
set to [ sleep, inf ]
and then kubectl exec
into it and run the exact same git-sync command by hand?
Which exact version of git-sync is this?
Are you mounting a volume somewhere?
from git-sync.
Related Issues (20)
- v4 slack webhook HOT 6
- exechook behavior HOT 4
- Remediate 4.2.2 security vulnerabilities HOT 1
- Support GitHub App authentication HOT 7
- TODO: infra to make #878 work HOT 1
- Curious about real example raising race condition when using v3 HOT 1
- exechook working HOT 8
- TODO: shellcheck test_e2e.sh and test_git.sh HOT 5
- /bin/sh: ./build/test.sh: not found
- test_e2e.sh: use `local` for all variables defined inside functions HOT 2
- git-sync Multiple Vulnerabilities HOT 3
- how can put specific html folder from my git repo to nginx pod? HOT 2
- git-sync produced an intermediate file,the path of command is wrong HOT 1
- How to use GITSYNC_SYNC_ON_SIGNAL parameter through helm in k8s? HOT 2
- Issue with building Git Sync Container HOT 3
- Issue with Git-sync repo inside a repo, Nested repo for airflow files HOT 7
- On initial sync, all files are in deleted status HOT 5
- V4: GITSYNC_REF or V3: GIT_SYNC_BRANCH HOT 10
- Adding monitoring mixin
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-sync.