[PR #11469] Add basic authentication support to client via env vars #75846

Open
opened 2026-05-05 08:16:34 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11469
Author: @ravivarmanr-quantrail
Created: 7/18/2025
Status: 🔄 Open

Base: mainHead: feature/auth-support


📝 Commits (1)

  • 08e0418 added basic authorization support

📊 Changes

3 files changed (+43 additions, -7 deletions)

View changed files

📝 api/client.go (+11 -5)
📝 api/client_test.go (+2 -2)
📝 envconfig/config.go (+30 -0)

📄 Description

The Ollama CLI lacked user authentication.
This PR adds basic auth support using OLLAMA_USERNAME and OLLAMA_PASSWORD environment variables.
If both are set, an Authorization header is added to client requests.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/11469 **Author:** [@ravivarmanr-quantrail](https://github.com/ravivarmanr-quantrail) **Created:** 7/18/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feature/auth-support` --- ### 📝 Commits (1) - [`08e0418`](https://github.com/ollama/ollama/commit/08e041835cf8b8b7af877d959084dac791abfd9d) added basic authorization support ### 📊 Changes **3 files changed** (+43 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `api/client.go` (+11 -5) 📝 `api/client_test.go` (+2 -2) 📝 `envconfig/config.go` (+30 -0) </details> ### 📄 Description The Ollama CLI lacked user authentication. This PR adds basic auth support using OLLAMA_USERNAME and OLLAMA_PASSWORD environment variables. If both are set, an Authorization header is added to client requests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 08:16:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#75846