Closed zhanghetong closed 4 years ago
I think I see two problems here:
git doesn't support basic authentication with SSH URLs. As I understand it "basic auth" is "HTTP Basic Authentication", meaning it only works with repositories referenced by http(s)://...
.
the URLs are a bit mixed up - in the Secret you have annotated with https://github.com
. In the Task you are referencing git@github.com
<- an SSH format.
I recommend changing your Task to use the following example PipelineResource:
resourceSpec:
type: git
params:
- name: revision
value: master
- name: url
value: https://github.com/tektoncd/pipeline.git
Closing this issue as I think the questions are resolved. Please reopen if you continue to experience problems and let me know if the changes I've suggested have made any difference. Thanks for the issue report!
Expected Behavior
connect git Successful
Actual Behavior
kubectl get pod:
git-ssh-creds-pod-m88jv 0/2 Error 0 41s
logs:
Steps to Reproduce the Problem
1. gitbasic.yaml:
gitbasicsa.yaml:
gittask.yaml:
2.
kubectl apply -f gitbasic.yaml
secret/basic-user-pass created
kubectl apply -f gitbasicsa.yamlserviceaccount/build-bot created
kubectl apply -f gittask.yamltaskrun.tekton.dev/git-ssh-creds created
3.
tkn taskrun describe git-ssh-creds
kubectl -n default logs git-ssh-creds-pod-m88jv -c step-git-source-gitssh-rvs28
Additional Info
Client version: 0.10.0 Pipeline version: v0.14.1 Triggers version: unknown