0

I am using self hosted runner behind a corporate proxy. I added our certificates but when doing :

  - name: Setup Java
    uses: actions/setup-java@v2
    with:
      distribution: 'adopt'
      java-package: jdk
      java-version: '11'

I am getting the error :

Error: unable to verify the first certificate

Any hint? Thank you

  • Can you verify your certificates on your runners? Do you know if your proxy intercepts requests? – rethab Mar 29 '22 at 09:00
  • The certificates must be added only at the system level ? A curl to https://github.com gives me a 200. – Raphael Perrin Mar 29 '22 at 10:52
  • Can you SSH into your runners? What if you curl the host where it's trying to download the jdk from? – rethab Mar 29 '22 at 11:15
  • Yes I can SSH. The command : `curl -L https://github.com/actions/python-versions/releases/download/3.10.4-2034678717/python-3.10.4-linux-20.04-x64.tar.gz -o python-source.tar.gz` But with -L it works. – Raphael Perrin Mar 29 '22 at 11:56
  • 1) in the question your talking about java, but this curl command is for python? 2) also try adding `-i -v` (show headers) – rethab Mar 29 '22 at 12:39
  • With Java, I am getting : `Run actions/setup-java@v2 with: distribution: adopt java-package: jdk java-version: 11 architecture: x64 check-latest: false server-id: github server-username: GITHUB_ACTOR server-password: GITHUB_TOKEN overwrite-settings: true job-status: success env: FORCE_COLOR: 2 Trying to resolve the latest version from remote Error: unable to verify the first certificate` – Raphael Perrin Mar 29 '22 at 12:54
  • Were you able to fix the issue? I am in the same boat – wehelpdox Mar 30 '22 at 23:50
  • After whitelisted the urls, it still doesn't work. Should the proxy setting be set somewhere else ? It is set at the "container level" as env variable : http_proxy and https_proxy – Raphael Perrin Apr 01 '22 at 11:16

1 Answers1

0

Adding env :

   env:
     - name: SSL_CERT_DIR
       value: "/etc/ssl/certs"

In runner deployment fixed the issue.