Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-6147

Git Resolver resolution not working with SSH URL

XMLWordPrintable

    • False
    • None
    • False
    • Customer Facing, Customer Reported

      Not able to configure git resolver using SSH url of git instead of HTTPS url.

      Resolution fails with below error

      ~~~
      Error retrieving pipeline for pipelinerun default/git-pipeline-reference-demo1: resolver failed to get Pipeline : error requesting remote resource: error getting "Git" "default/git-abd0cfdbcc134dc44a2f2330d942d26d": clone error: error creating SSH agent: "SSH agent requested but SSH_AUTH_SOCK not-specified"

      ~~~

      Documentation doesn't mentions any specific was to use SSH URL, so not sure if it's supported.

      Below is resolver config.

      ~~~
      git-resolver-config:
      api-token-secret-key: github-auth-key
      api-token-secret-name: github-auth-secret
      api-token-secret-namespace: sendmail
      default-org: tektoncd
      default-revision: main
      fetch-timeout: 1m
      scm-type: github
       
      ~~~

      Test PipelineRun

      ~~~

      apiVersion: tekton.dev/v1
      kind: PipelineRun
      metadata:
        name: git-pipeline-reference-demo
      spec:
        pipelineRef:
          resolver: git
          params:
          - name: url
            value: git@github.com:tektoncd/catalog.git
          - name: revision
            value: main
          - name: pathInRepo
            value: pipeline/buildpacks/0.1/buildpacks.yaml
        params:
        - name: name
          value: "testPipelineRun"
        - name: sample-pipeline-parameter
          value: test

      ~~~

      I tried using Github personal token, SSH private key and application API key as value for api-token-secret-key.

      Issue is always reproducible.

              Unassigned Unassigned
              rhn-support-sudnair Sudhish Nair
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: