我正在尝试将我们的 bitbucket 存储库与 tekton 管道集成。我执行的步骤如下所述。
- 创建 K8s 密钥
apiVersion: v1 kind: Secret metadata: name: bitbuckt-secret-1 namespace: cicd annotations: tekton.dev/git-0: bitbucket.org type: kubernetes.io/basic-auth stringData: username: test-admin password: <<password>>
- 当我执行 tekton 管道时,在 serviceaccount 中添加了秘密,我得到了以下错误
test -z '' test -z '' /ko-app/git-init -url=https://bnc-titsi-admin@bitbucket.org/bnc-titsi/grpc-poc-bff.git -revision=master -refspec= -path=/workspace/output/ -sslVerify=true -submodules=true -depth=1 -sparseCheckoutDirectories= {"level":"error","ts":1638952738.3208334,"caller":"git/git.go:54","msg":"Error running git [fetch --recurse-submodules=yes --depth=1 origin --update-head-ok --force master]: exit status 128\nfatal: could not read Password for 'https://bnc-titsi-admin@bitbucket.org': No such device or address\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:54\ngithub.com/tektoncd/pipeline/pkg/git.Fetch\n\t/opt/app-root/src/go/src/github.com/tektoncd/pipeline/pkg/git/git.go:149\nmain.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"} {"level":"fatal","ts":1638952738.320914,"caller":"git-init/main.go:54","msg":"Error fetching git repository: failed to fetch [master]: exit status 128","stacktrace":"main.main\n\t/opt/app-root/src/go/src/github.com/tektoncd/pipeline/cmd/git-init/main.go:54\nruntime.main\n\t/usr/lib/golang/src/runtime/proc.go:203"}
但是当我以同样的方式集成 github 时,它工作得很好。
请帮我。