[GH-ISSUE #1471] Publishing model fails with "Error: unable to push ..." #792

Closed
opened 2026-04-12 10:28:24 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @stephenwithav on GitHub (Dec 11, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1471

I followed the import doc steps, but I'm getting the error in the title.

I've:

  1. Created an account.
  2. Copied my id_ed25519.pub file to ~/.ollama/ and /usr/share/ollama/.ollama.
  3. Added the public key to my account.
  4. Copied the model to my username's namespace.
  5. Attempted ollama push stephenwithav/book-summary
Error: unable to push stephenwithav/book-summary, make sure this namespace exists and you are authorized to push to it
Originally created by @stephenwithav on GitHub (Dec 11, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1471 I followed the [import doc](https://github.com/jmorganca/ollama/blob/7a1b37ac64f0fb0585e279a0a840707843511ed3/docs/import.md?plain=1#L108) steps, but I'm getting the error in the title. I've: 1. Created an account. 2. Copied my `id_ed25519.pub` file to `~/.ollama/` and `/usr/share/ollama/.ollama`. 3. Added the public key to my account. 4. Copied the model to my username's namespace. 5. Attempted `ollama push stephenwithav/book-summary` ``` Error: unable to push stephenwithav/book-summary, make sure this namespace exists and you are authorized to push to it ```
Author
Owner

@mxyng commented on GitHub (Dec 11, 2023):

To clarify, you copied your public key into ~/.ollama and /usr/share/ollama/.ollama but you're not using the public key already in those directories?

Ollama create an application specific Ed25519 key pair and stores both the public and private keys in those directories. Copying a public key into that directory does not import the key to use for push. Instead, you should copy the public key from those directories and import them into ollama.ai.

<!-- gh-comment-id:1851008189 --> @mxyng commented on GitHub (Dec 11, 2023): To clarify, you copied your public key into `~/.ollama` and `/usr/share/ollama/.ollama` but you're not using the public key already in those directories? Ollama create an application specific Ed25519 key pair and stores both the public and private keys in those directories. Copying a public key into that directory does not import the key to use for push. Instead, you should copy the public key from those directories and import them into ollama.ai.
Author
Owner

@stephenwithav commented on GitHub (Dec 11, 2023):

I copied the public (and private) key to those directories and added the public key to my account on ollama.ai.

<!-- gh-comment-id:1851079587 --> @stephenwithav commented on GitHub (Dec 11, 2023): I copied the public (and private) key to those directories _and_ added the public key to my account on ollama.ai.
Author
Owner

@mxyng commented on GitHub (Dec 12, 2023):

Right, you should not copy your key to those directories. You should use the id_ed25519.pub that already exist in those directory and import it to ollama.ai.

When you start ollama, it will create a keypair used specifically for ollama and save it into either ~/.ollama or /usr/share/ollama/.ollama as id_ed25519 (private key) and id_ed25519.pub (public key). When you want to publish, you take this id_ed25519.pub and import into ollama.ai, not another key.

Copying a private key is possible but not advisable. If that's the route you want to take, make sure the key has the right ownership and permissions. On macOS, they should be owned by your user. On Linux, they should be owned by the ollama user

<!-- gh-comment-id:1851135066 --> @mxyng commented on GitHub (Dec 12, 2023): Right, you should _not_ copy your key to those directories. You should use the `id_ed25519.pub` that already exist in those directory and import it to ollama.ai. When you start ollama, it will create a keypair used specifically for ollama and save it into either `~/.ollama` or `/usr/share/ollama/.ollama` as `id_ed25519` (private key) and `id_ed25519.pub` (public key). When you want to publish, you take this `id_ed25519.pub` and import into ollama.ai, not another key. Copying a private key is possible but not advisable. If that's the route you want to take, make sure the key has the right ownership and permissions. On macOS, they should be owned by your user. On Linux, they should be owned by the `ollama` user
Author
Owner

@mxyng commented on GitHub (Jan 20, 2024):

Closing this since it hasn't been updated for a while. Please reopen it if it's still an issue

<!-- gh-comment-id:1901417094 --> @mxyng commented on GitHub (Jan 20, 2024): Closing this since it hasn't been updated for a while. Please reopen it if it's still an issue
Author
Owner

@OmegaT4224 commented on GitHub (Nov 3, 2024):

ollama cp llama3.2 dingo/yo-yo
ollama push dingo/yo-yo

<!-- gh-comment-id:2453254403 --> @OmegaT4224 commented on GitHub (Nov 3, 2024): ollama cp llama3.2 dingo/yo-yo ollama push dingo/yo-yo
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#792