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

Failure to auth with public key against GitHub while vanilla git works correctly. #88

Closed
jmalloc opened this issue May 29, 2022 · 8 comments

Comments

@jmalloc
Copy link
Owner

jmalloc commented May 29, 2022

No description provided.

@madlitz
Copy link

madlitz commented May 29, 2022

github: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

@timamehro61
Copy link

timamehro61 commented May 30, 2022

github: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

@jmalloc
Copy link
Owner Author

jmalloc commented May 30, 2022

In Des's case, the issue was that the SSH keys hadn't been added to the SSH agent.

I do this by running this command in my .zshrc:

ssh-add --apple-load-keychain

@ezzatron
Copy link
Collaborator

For @timamehro61, the issue was a combination of:

  1. SSH keys not being added to the agent.
  2. Had generated an SSH key using ssh-keygen with default options, which creates an RSA + SHA-1 key, which something was refusing to use because it was insecure.

We solved 2. by getting Tima to generate a new SSH key using ed25519 as per the GitHub guide's recommendations.

We then solved 1. by adding these lines to .ssh/config, then cloning a repo once via vanilla git to trigger the new SSH key to be added to the agent:

UseKeychain yes
AddKeysToAgent yes

@james I think those 2 SSH config lines are possibly a replacement for running ssh-add --apple-load-keychain.

@jmalloc
Copy link
Owner Author

jmalloc commented May 30, 2022

Thanks all, I will close this. Please feel free to ask me on Slack or create issues in this repo if you have any further issues with Grit.

@jmalloc jmalloc closed this as completed May 30, 2022
@ezzatron
Copy link
Collaborator

The same error can also present when using something like 1Password as your SSH agent. In that case you need to set the SSH_AUTH_SOCK environment variable like so: https://github.com/ezzatron/dotfiles/blob/994de384e49ad9305e05c48eb606626d25b05c94/dotfiles/.zshenv#L42

@ezzatron
Copy link
Collaborator

@jmalloc I was thinking maybe we should have a small troubleshooting guide for Grit somewhere with all of these common issues. Any thoughts? Preferences on a wiki page vs. something in the repo?

@jmalloc
Copy link
Owner Author

jmalloc commented Jan 19, 2023

I don't use wikis, something in the repo would be cool.

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

No branches or pull requests

4 participants