Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
148f0225
"examples/python/visualization_utils.ipynb" did not exist on "20a771e5143c6867eee63868c38a5bcc272a35e7"
Commit
148f0225
authored
Aug 11, 2023
by
Jeffrey Morgan
Browse files
create `.ollama` directory if it doesnt exist
parent
4e07941b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
server/auth.go
server/auth.go
+7
-3
No files found.
server/auth.go
View file @
148f0225
...
...
@@ -9,7 +9,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"os"
...
...
@@ -62,9 +61,14 @@ func getAuthToken(redirData AuthRedirect, regOpts *RegistryOptions) (string, err
return
""
,
err
}
keyPath
:=
path
.
Join
(
home
,
".ollama
/
id_ed25519"
)
keyPath
:=
path
.
Join
(
home
,
".ollama
"
,
"
id_ed25519"
)
rawKey
,
err
:=
ioutil
.
ReadFile
(
keyPath
)
err
=
os
.
MkdirAll
(
path
.
Dir
(
keyPath
),
0700
)
if
err
!=
nil
{
return
""
,
fmt
.
Errorf
(
"could not create .ollama directory %w"
,
err
)
}
rawKey
,
err
:=
os
.
ReadFile
(
keyPath
)
if
err
!=
nil
{
log
.
Printf
(
"Failed to load private key: %v"
,
err
)
return
""
,
err
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment