`cog login` fails silently if `pass` is uninitialized
Nobody has claimed this yet.
- 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:
gpg --generate-key- grab gpg id
pass init [gpg_id]- re-run
cog login
Reference: https://github.com/docker/docker-credential-helpers/issues/102#issuecomment-388634452
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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