[GH-ISSUE #10783] Ollama unable to interpret a local SSL Cert #53595

Closed
opened 2026-04-29 04:03:50 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @jgforbes on GitHub (May 20, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10783

What is the issue?

pulling manifest
Error: pull model manifest: Get "https://hf.co/v2/unsloth/Llama-3.2-3B-Instruct-GGUF/manifests/Q4_K_M": tls: failed to parse certificate from server: x509: negative serial number

We have web proxy that decrypts content and re-encrypts with a local ssl certificate. The local certificate is correctly installed and "curl -v https://hf.co" works correctly.

This error is emitted in both the Linux and Windows versions

Relevant log output


OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @jgforbes on GitHub (May 20, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10783 ### What is the issue? ```:~$ ollama run hf.co/unsloth/Llama-3.2-3B-Instruct-GGUF:Q4_K_M pulling manifest Error: pull model manifest: Get "https://hf.co/v2/unsloth/Llama-3.2-3B-Instruct-GGUF/manifests/Q4_K_M": tls: failed to parse certificate from server: x509: negative serial number ``` We have web proxy that decrypts content and re-encrypts with a local ssl certificate. The local certificate is correctly installed and "curl -v https://hf.co" works correctly. This error is emitted in both the Linux and Windows versions ### Relevant log output ```shell ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the bug label 2026-04-29 04:03:51 -05:00
Author
Owner

@rick-github commented on GitHub (May 20, 2025):

https://pkg.go.dev/crypto/x509#ParseCertificate

Before Go 1.23, ParseCertificate accepted certificates with negative serial numbers. This behavior
can be restored by including "x509negativeserial=1" in the GODEBUG environment variable.
<!-- gh-comment-id:2895768747 --> @rick-github commented on GitHub (May 20, 2025): https://pkg.go.dev/crypto/x509#ParseCertificate ``` Before Go 1.23, ParseCertificate accepted certificates with negative serial numbers. This behavior can be restored by including "x509negativeserial=1" in the GODEBUG environment variable. ```
Author
Owner

@jgforbes commented on GitHub (May 23, 2025):

Is the GODEBUG environment variable supposed to work at run time:

:~$ GODEBUG=x509negativeserial=1   ollama run hf.co/unsloth/Llama-3.2-3B-Instruct-GGUF:Q4_K_M
pulling manifest
Error: pull model manifest: Get "https://hf.co/v2/unsloth/Llama-3.2-3B-Instruct-GGUF/manifests/Q4_K_M": tls: failed to parse certificate from server: x509: negative serial number
<!-- gh-comment-id:2904584102 --> @jgforbes commented on GitHub (May 23, 2025): Is the GODEBUG environment variable supposed to work at run time: ``` :~$ GODEBUG=x509negativeserial=1 ollama run hf.co/unsloth/Llama-3.2-3B-Instruct-GGUF:Q4_K_M pulling manifest Error: pull model manifest: Get "https://hf.co/v2/unsloth/Llama-3.2-3B-Instruct-GGUF/manifests/Q4_K_M": tls: failed to parse certificate from server: x509: negative serial number ```
Author
Owner

@rick-github commented on GitHub (May 23, 2025):

Set it in the server environment.

<!-- gh-comment-id:2904588687 --> @rick-github commented on GitHub (May 23, 2025): Set it in the server environment.
Author
Owner

@jgforbes commented on GitHub (May 23, 2025):

It has to go in the ollama.service file Environment statement.

Environment="GODEBUG=x509negativeserial=1"
<!-- gh-comment-id:2904821303 --> @jgforbes commented on GitHub (May 23, 2025): It has to go in the ollama.service file Environment statement. ``` Environment="GODEBUG=x509negativeserial=1" ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#53595