Skip to content

Resolve "Runner unable to fetch via https - Problem with the SSL CA cert"

What does this MR do?

Adds a line to the BASH script that the executor will run if that executor is ssh (or shell) that sets the environment variable CI_BASHSHELL_BASE_DIR to PWD at the beginning of the executor script. The function Absolute() is modified to use this environment variable instead of PWD so that the path is consistent with the base directory.

Why was this MR needed?

Issue #2950 (closed) points out that when the ssh executor is doing a fetch instead of a clone, the PWD is wrong because the fetch required the script to change directories. This causes the sslCertCA configuration option to point to a path that is // when it should be just /. This change fixes this issue by giving the Absolute call a base directory to use.

Are there points in the code the reviewer needs to double check?

I put this fish into bash.go, but most of the work is done in abstract.go. One heavily affects the other. This fix will not fix fetch for cmd.go. I have no way to test the Windows runner currently.

Does this MR meet the acceptance criteria?

  • [ ] Documentation created/updated (N/A)
  • Tests
    • Added for this feature/bug
    • All builds are passing
  • Branch has no merge conflicts with master (if you do - rebase it please)

What are the relevant issue numbers?

Closes #2950 (closed)

Edited by Erik Hovland

Merge request reports