-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git-clone task cannot handle backslash in the username of a secret #3887
Comments
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
@kulon are you still running into this issue? or have a workaround? |
/assign @abayer |
Fixes tektoncd#3887 The proper format for a username like `foo\bar` in `.gitconfig` is `username = foo\\bar` - i.e., the `\` needs to be escaped. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Fixes tektoncd#3887 The proper format for a username like `foo\bar` in `.gitconfig` is `username = foo\\bar` - i.e., the `\` needs to be escaped. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Fixes #3887 The proper format for a username like `foo\bar` in `.gitconfig` is `username = foo\\bar` - i.e., the `\` needs to be escaped. Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
The git-clone task fails if the secret associated with the service account used to run the task contains a backslash "\" in the username. For example, if the username of the secret contains a value "domain\firstname.lastname", the git-clone task will throw the following error:
Error running git [init /workspace/output/]: exit status 128\nfatal: bad config line 4 in file /tekton/home/.gitconfig\n","stacktrace":"github.com/tektoncd/pipeline/pkg/git.run\n\t/opt/app-root/src/go/src/github.com/tektoncd/pipeline/pkg/git/git.go:47\ngit.luolix.top/tektoncd/pipeline/pkg/git.Fetch\n\t/opt/app-root/src/go/src/github.com/tektoncd/pipeline/pkg/git/git.go:74\nmain.main\n\t/opt/app-root/src/go/src/github.com/tektoncd/pipeline/cmd/git-init/main.go:52\nruntime.main\n\t/usr/lib/golang/src/runtime/proc.go:203"}
{"level":"fatal","ts":1618348159.1216874,"caller":"git-init/main.go:53","msg":"Error fetching git repository: exit status 128","stacktrace":"main.main\n\t/opt/app-root/src/go/src/github.com/tektoncd/pipeline/cmd/git-init/main.go:53\nruntime.main\n\t/usr/lib/golang/src/runtime/proc.go:203"}
A workaround would be to use a different form of the username if applicable. For example, the following format would be handled successfully by the task: "firstname.lastname@mycompany.com".
The issue has occurred in the following environment:
OpenShift cluster - 4.6.17
Red Hat OpenShift Pipelines Operator - 1.2.3
Components:
Tekton Pipelines: v0.16.3
Tekton Triggers: v0.8.1
ClusterTasks based on Tekton Catalog 0.16
The text was updated successfully, but these errors were encountered: