mirror of
https://github.com/ollama/ollama.git
synced 2025-11-11 04:28:05 +01:00
engine: add remote proxy (#12307)
This commit is contained in:
13
auth/auth.go
13
auth/auth.go
@@ -19,6 +19,19 @@ import (
|
||||
const defaultPrivateKey = "id_ed25519"
|
||||
|
||||
func keyPath() (string, error) {
|
||||
fileExists := func(fp string) bool {
|
||||
info, err := os.Stat(fp)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
return !info.IsDir()
|
||||
}
|
||||
|
||||
systemPath := filepath.Join("/usr/share/ollama/.ollama", defaultPrivateKey)
|
||||
if fileExists(systemPath) {
|
||||
return systemPath, nil
|
||||
}
|
||||
|
||||
home, err := os.UserHomeDir()
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user