`cog login` fails silently if `pass` is uninitialized
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
Thanks for taking the time to write this up!
Not sure where this would go in the docs, to be honest. We don't really have a troubleshooting doc. Maybe just having this as an issue is a good start, so people can Google there way to this issue to get unblocked. What do you think?
@zeke Agreed, thought it'd be helpful to have an issue that folks could stumble upon in the future. I'll close this now!
More people have been running into this. It shouldn't be in documentation – we should detect it and fix it or print instructions.
this is still not working and I am unable to log into cog to push my model.
Thanks it worked with gpg and pass init :)