Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to publish due to key verification failure #5620

Closed
johnwhitington opened this issue Jul 28, 2023 · 5 comments
Closed

Unable to publish due to key verification failure #5620

johnwhitington opened this issue Jul 28, 2023 · 5 comments

Comments

@johnwhitington
Copy link
Contributor

johnwhitington commented Jul 28, 2023

I see:

$ opam publish

The following will be published:
  - camlpdf version 2.6 with opam file at /Users/john/repos/camlpdf/camlpdf.opam
    archive at https://github.com/johnwhitington/camlpdf/archive/refs/tags/v2.6.tar.gz


You will be shown the patch before submitting.
Please confirm the above data. Continue ?  [Y/n] Y
Please generate a Github token at https://github.com/settings/tokens/new to allow access.
The "public_repo" scope is required ("repo" if submitting to a private opam repository).

Please enter your GitHub personal access token: 
The token will be stored in ~/.opam/plugins/opam-publish/ocaml%opam-repository.token.
Cloning the package repository, this may take a while...
+ /usr/bin/git "clone" "[email protected]:ocaml/opam-repository.git" "/Users/john/.opam/plugins/opam-publish/repos/ocaml%opam-repository"
The authenticity of host 'github.com (140.82.121.4)' can't be established.
ED25519 key fingerprint is SHA256:+<elided>
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? - Cloning into '/Users/john/.opam/plugins/opam-publish/repos/ocaml%opam-repository'...

- Host key verification failed.
- fatal: Could not read from remote repository.
- 
- Please make sure you have the correct access rights
- and the repository exists.
[ERROR] Uncaught exception: "/usr/bin/git clone [email protected]:ocaml/opam-repository.git
        /Users/john/.opam/plugins/opam-publish/repos/ocaml%opam-repository" exited with code 128

I created the key with public_repo rights as requested.

As a first step, how can I delete this key to try again? Running opam_publish now tries to use the stored one...

@johnwhitington johnwhitington changed the title Unable to publish - Unable to publish due to key verification failure Jul 28, 2023
@kit-ty-kate
Copy link
Member

It looks like the github token isn't to blame here but rather your SSH key linked with github.

According to curl -L https://github.com/johnwhitington.keys you do not have any valid SSH key linked with your profile.

@kit-ty-kate
Copy link
Member

Opened ocaml-opam/opam-publish#154 as a tentative fix

@johnwhitington
Copy link
Contributor Author

Thanks. I followed Github's instructions for adding a key and now we have:

$ curl -L https://github.com/johnwhitington.keys 
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL3wzuVpJg2lfWIrjqhq+NpjHJN5Vbr3OCIZkP3r2zjv

But opam publish still fails in the same way.

@kit-ty-kate
Copy link
Member

Is ocaml-opam/opam-publish#154 not working for you?

@kit-ty-kate
Copy link
Member

Moved to ocaml-opam/opam-publish#155 as opam-publish is a plugin separate from the main opam binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants