Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSSL "unregistered scheme" in GitHub workflow (from git clone) #187

Open
akaihola opened this issue Aug 6, 2023 · 1 comment
Open

Comments

@akaihola
Copy link

akaihola commented Aug 6, 2023

In this Linux build for the Graylint repository, as well as in the corresponding macOS build, when pip tries to use git clone to get a source tree, I get this error:

Collecting darkgraylib@ git+https://github.com/akaihola/darkgraylib.git@main (from graylint==0.0.1)
  Cloning https://github.com/akaihola/darkgraylib.git (to revision main) to /run/user/1001/pip-install-dnkydxr_/darkgraylib_bbfcb20d93f844b6b422297e35bdf0b0
  Running command git clone --filter=blob:none --quiet https://github.com/akaihola/darkgraylib.git /run/user/1001/pip-install-dnkydxr_/darkgraylib_bbfcb20d93f844b6b422297e35bdf0b0
  fatal: unable to access 'https://github.com/akaihola/darkgraylib.git/': OpenSSL/3.0.9: error:16000069:STORE routines::unregistered scheme
  error: subprocess-exited-with-error
  
  × git clone --filter=blob:none --quiet https://github.com/akaihola/darkgraylib.git /run/user/1001/pip-install-dnkydxr_/darkgraylib_bbfcb20d93f844b6b422297e35bdf0b0 did not run successfully.
  │ exit code: 128
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

Maybe related to

@akaihola
Copy link
Author

akaihola commented Aug 6, 2023

I managed to work around the problem like so:

    steps:
      - uses: actions/checkout@v3
      - uses: cachix/install-nix-action@v22
        with:
          nix_path: nixpkgs=channel:nixos-unstable
      - name: Download wheel uploaded by the build-wheel job
        uses: actions/download-artifact@v3
      - name: Run tests in nix-shell
        run: |
          nix-shell \
            --pure \
            --run '
              python -m venv venv
              source venv/bin/activate
              cert_file=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
              export NIX_SSL_CERT_FILE=$cert_file
              pip install "${{needs.build-wheel.outputs.wheel-path}}[test]"
              pytest
            ' \
            ./default.nix

So NIX_SSL_CERT_FILE needed to be set inside the Nix shell environment.

I wonder if there's a more elegant way to make this work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant