Skip to content

Conversation

@bananna-droid
Copy link

@bananna-droid bananna-droid commented Jan 26, 2026

Description

Adds support for custom CA certificate bundle path configuration to resolve SSL certificate validation failures.

Fixes

#146

Affected Platforms

This issue affects all platforms (Linux, Windows, macOS), not just Linux:

  • Linux: Confirmed on Ubuntu 24.04 / Pop!_OS 24.04 (tested by me)
  • Windows: Confirmed on Windows 10 (tested by me)
  • macOS: Likely affected (same root cause)

The plugin appears to be built with OpenSSL on all platforms, which fails to locate system CA certificates without proper configuration.

Testing

  • ✅ Tested and working on Linux (Ubuntu 24.04, Pop!_OS 24.04) with Godot 4.5.1 and 4.6
  • ✅ Tested and working on Windows 10 VM with Godot 4.6

Changes

  • Added ca_bundle_path member and set_ca_bundle_path() method to GitPlugin
  • Implemented automatic config loading from ca_cert_config.txt
  • Uses git_libgit2_opts(GIT_OPT_SET_SSL_CERT_LOCATIONS) for runtime certificate configuration
  • Included template config file with examples for common Linux distributions

Testing

Tested on Linux with custom CA bundle path. SSL operations (fetch/pull/push) now work correctly when config file is present.

Behavior

  • Opt-in: No changes to default behavior
  • Zero impact: Users without the config file experience no changes
  • User-friendly: Simple text file configuration, no code modifications needed

Example Config File

# ca_cert_config.txt
/etc/ssl/certs/ca-certificates.crt

Rationale

While ideally libgit2 would auto-detect certificate locations on all systems, this provides users immediate control in environments where auto-detection fails. This follows the same pattern as curl's --cacert and git's http.sslCAInfo options.

Fix for linux for issue 146

Allows users to specify a custom CA certificate bundle path via
ca_cert_config.txt configuration file. This addresses SSL certificate
validation failures on Linux systems where libgit2's default certificate
detection fails.

Implementation uses git_libgit2_opts(GIT_OPT_SET_SSL_CERT_LOCATIONS)
to set the certificate path at runtime.
The feature is opt-in and should have zero impact on existing users.
@Calinou Calinou added the bug label Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants