Skip to content

Change in git_config results in inability to use combined ca certs #476

Description

@thelangley

Describe the bug

#457

The change results in different behaviour depending on if you're looking at a native git resource in concourse or a custom script.

Could a variable please be created for opting out and using the original behaviour where custom script/container can use the default store for ca certs?

Reproduction steps

  1. deploy concourse onto k8s, using workerAdditionalCerts, ensure certsPath is set on the workers in the helm chart
  2. configure git resource in concourse pipeline with git_config - name: http.sslCAInfo value: /etc/ssl/certs/worker-additional-certs.pem
  3. Notice Concourse is able to clone the repo nicely
  4. create job with script which uses custom image which cds to repo and git pull. note the error as the path to /etc/ssl/certs/worker-additional-certs.pem is no longer valid as Concourse has expanded all certs into separate files and /etc/ssl/certs/worker-additional-certs.pem no longer exists
    ...

Expected behavior

Concourse can clone repos nicely using specific ca certs
Concourse can also run scripts with custom images for various distros and use the system ca-cert store. not necessarily inheriting from the original resource

Additional context

No response

Activity

  1. taylorsilva commented on Jun 26, 2026

    @taylorsilva
    Member

    The change results in different behaviour depending on if you're looking at a native git resource in concourse or a custom script.

    Could a variable please be created for opting out and using the original behaviour where custom script/container can use the default store for ca certs?

    Could you explain this a bit more please? Why do you mean by "or a custom script"? What custom script? Are you pulling in the code from this repo into something else that isn't a Concourse resource?

    This part too in "Expected behavior":

    Concourse can also run scripts with custom images for various distros and use the system ca-cert store. not necessarily inheriting from the original resource

    Concourse can run scripts with custom images (??) using task steps (??).

    Just looking for more clarification because I'm unsure how this broke things for you. An example pipeline, even if it's just psuedo-code, would be helpful to illustrate the problem you're having. TY!

  2. thelangley commented on Jun 29, 2026

    @thelangley
    Author

    Apologies for being so vague. Here's a little more

    We have a git-resource configured in a Concourse pipeline. We are Enterprise so have proxy and private repos. As such we need to provide ca certs and creds.

    - name: thingy
      type: git
      check_every: 30s
      source:
        uri: https://github.com/im_a_lovely_repo
        ignore_paths:
        - stuff
        branch: master
        disable_ci_skip: true
        git_config:
        - name: http.sslCAInfo
          value: /etc/ssl/certs/worker-additional-certs.pem"
    

    We can see /etc/ssl/certs/worker-additional-certs.pem in our workers and the git-resource is able to use this git_config. This is what the /etc/ssl/certs looks like from the perspective of a hijacked git-resource.

    bash-5.3# ls -lah /etc/ssl/certs
    total 772K
    drwxr-xr-x. 2 root root 4.0K Jun 26 08:46 .
    drwxr-xr-x. 3 root root 4.0K Jun 26 08:46 ..
    -rw-r--r--. 1 root root xxK Jun 26 08:46 ca-bundle.crt
    -rw-r--r--. 1 root root xxK Jun 26 08:46 ca-certificates.crt
    -rw-r--r--. 1 root root xxK Jun 26 08:46 worker-additional-certs.pem
    

    It looks the same if you shell into any of the workers as root.

    We have a job with a task which uses an ubuntu 22.04.5 based image with our own tooling deployed.

    Part of the script which runs cds into the repo and does some git commands. These fail because the container cannot see /etc/ssl/certs/worker-additional-certs.pem

    To us, it looks like git-resources can be grabbed as they have access to /etc/ssl/certs/worker-additional-certs.pem

    But as soon as our container starts, that certificate does not exist anymore and instead the /etc/ssl/certs/worker-additional-certs.pem file has been injected into ca-certificates.crt and split out into individual separate cert files. If you have no git_config set, the resource is able to use the default store which now includes these certs. If it inherits from the parent git-resource, it cannot find the specific file so fails.

  3. thelangley commented on Jun 29, 2026

    @thelangley
    Author

    I've set an env var of GIT_SSL_CAINFO: /etc/ssl/certs/ca-certificates.crt on the task and that make it possible to do git commands. so using a git override to override the inherited "more consistent config" with the certs that are available.

    I've got a workaround so I'm happy to close but it's not very elegant.

  4. taylorsilva commented on Jun 29, 2026

    @taylorsilva
    Member

    AH okay, I understand how that PR broke things for you now.

    I'm not sure how to reconcile this with the issue originally raised in #369 which is what the PR resolved. That issue is basically asking for the reverse of what you're asking for here (kind of).

    Only thought that comes to mind is to add another config option that disables persisting the git config in the resource's output.

    I'm fine leaving this open and am open to a PR to resolve this scenario or other ideas folks have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions