replicate / replicate/cog

`cog login` fails silently if `pass` is uninitialized

Open
#842 7 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

next type/bug
Dominant language
Go
Stars
9.5k
Forks
696
Avg merge
7d 19h
Merged PRs (30d)
2

Description

Ran into an issue and thought I'd leave the solution here for incorporation into docs.

I had to spin up a machine on Google Cloud to build & test a Cog model. It's running Debian 10:

c0-deeplearning-common-cu110-v20221107-debian-10
Google, Debian 10 based Deep Learning VM with , M100, Base CUDA 11.0, Deep Learning VM Image with CUDA 11.0 preinstalled.
ck@cog-p4:~/cog-pyannote/speaker-diarization$ cog login
This command will authenticate Docker with Replicate's 'r8.im' Docker registry. You will need a Replicate account.

Hit enter to get started. A browser will open with an authentication token that you need to paste here.

If it didn't open automatically, open this URL in a web browser:
https://replicate.com/auth/token

Once you've signed in, copy the authentication token from that web page, paste it here, then hit enter:
SNIPPED_TOKEN
ⅹ Failed to run docker-credential-desktop: exit status 1
ck@cog-p4:~/cog-pyannote/speaker-diarization$ docker-credential-store store

I found the underlying issue by calling docker-credential-desktop directly with

docker-credential-desktop store
{"Username":"cameronk","Secret":"SNIPPED_TOKEN","ServerURL":"r8.im"}
error storing credentials - err: exit status 1, out: `pass not initialized: exit status 1`

Turns out this is because pass is not initialized. Solution:

  1. gpg --generate-key
  2. grab gpg id
  3. pass init [gpg_id]
  4. re-run cog login

Reference: https://github.com/docker/docker-credential-helpers/issues/102#issuecomment-388634452

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the documentation for the cog login entry point and review the reported Docker credential failure on Debian 10. Document the prerequisite gpg --generate-key and pass init [gpg_id] steps so users can authenticate successfully when pass is uninitialized.

Written by the indexing model from the issue text.

Assessment

Tech stack
debian, docker, gcp
Domain
cli, cloud, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.