Permission denied (publickey) - MacOS 12.5.1 - Github
I'm attempting to use 1pass to save a ssh-key for GitHub. I have the key generated and set as a signed key in GitHub.
I edited the .ssh/config file as instructed, and set the SSH_AUTH_SOCK path. I used the auto edit for the .gitconfig file and verified it was correct.
I am on the newest version of git (2.40.1), and my key is in my private vault.
I have read through every support/community page I can find to try to get this to work, so here are some common outputs:
ssh-add -l:4096 SHA256:rKYhoyJ2RDe9zxiFnB3KPaLefvfjotJeNJXbNn8hXrg Github (RSA)
<--- Correct key
ssh -vT git@github.com
OpenSSH_8.6p1, LibreSSL 3.3.6 debug1: Reading configuration data /Users/william/.ssh/config debug1: /Users/william/.ssh/config line 1: Applying options for * debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files debug1: /etc/ssh/ssh_config line 54: Applying options for * debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling debug1: Connecting to github.com port 22. debug1: Connection established. debug1: identity file /Users/william/.ssh/id_rsa type 0 debug1: identity file /Users/william/.ssh/id_rsa-cert type -1 debug1: identity file /Users/william/.ssh/id_dsa type -1 debug1: identity file /Users/william/.ssh/id_dsa-cert type -1 debug1: identity file /Users/william/.ssh/id_ecdsa type -1 debug1: identity file /Users/william/.ssh/id_ecdsa-cert type -1 debug1: identity file /Users/william/.ssh/id_ecdsa_sk type -1 debug1: identity file /Users/william/.ssh/id_ecdsa_sk-cert type -1 debug1: identity file /Users/william/.ssh/id_ed25519 type -1 debug1: identity file /Users/william/.ssh/id_ed25519-cert type -1 debug1: identity file /Users/william/.ssh/id_ed25519_sk type -1 debug1: identity file /Users/william/.ssh/id_ed25519_sk-cert type -1 debug1: identity file /Users/william/.ssh/id_xmss type -1 debug1: identity file /Users/william/.ssh/id_xmss-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_8.6 debug1: Remote protocol version 2.0, remote software version babeld-dfc7e6c0 debug1: compat_banner: no match: babeld-dfc7e6c0 debug1: Authenticating to github.com:22 as 'git' debug1: load_hostkeys: fopen /Users/william/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ssh-ed25519 debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: SSH2_MSG_KEX_ECDH_REPLY received debug1: Server host key: ssh-ed25519 SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU debug1: load_hostkeys: fopen /Users/william/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory debug1: Host 'github.com' is known and matches the ED25519 host key. debug1: Found key in /Users/william/.ssh/known_hosts:19 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 134217728 blocks debug1: Will attempt key: Github RSA SHA256:rKYhoyJ2RDe9zxiFnB3KPaLefvfjotJeNJXbNn8hXrg agent debug1: Will attempt key: /Users/william/.ssh/id_rsa RSA SHA256:[redacted] debug1: Will attempt key: /Users/william/.ssh/id_dsa debug1: Will attempt key: /Users/william/.ssh/id_ecdsa debug1: Will attempt key: /Users/william/.ssh/id_ecdsa_sk debug1: Will attempt key: /Users/william/.ssh/id_ed25519 debug1: Will attempt key: /Users/william/.ssh/id_ed25519_sk debug1: Will attempt key: /Users/william/.ssh/id_xmss debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa> debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering public key: Github RSA SHA256:rKYhoyJ2RDe9zxiFnB3KPaLefvfjotJeNJXbNn8hXrg agent debug1: Authentications that can continue: publickey debug1: Offering public key: /Users/william/.ssh/id_rsa RSA SHA256:[redacted] debug1: Authentications that can continue: publickey debug1: Trying private key: /Users/william/.ssh/id_dsa debug1: Trying private key: /Users/william/.ssh/id_ecdsa debug1: Trying private key: /Users/william/.ssh/id_ecdsa_sk debug1: Trying private key: /Users/william/.ssh/id_ed25519 debug1: Trying private key: /Users/william/.ssh/id_ed25519_sk debug1: Trying private key: /Users/william/.ssh/id_xmss debug1: No more authentication methods to try. git@github.com: Permission denied (publickey).
(I removed my other personal key, shouldn't make a difference)
I also tried ed25519 instead of RSA but had the exact same issue.
my GitHub origin is set, and I have confirmed that it is correct, so I don't believe that is the issue.
If there is any other information I can provide, let me know. I'm past what I can think of.
1Password Version: 1Password for Mac 8.10.4 (81004032)
Extension Version: Not Provided
OS Version: MacOS 12.5.1
Browser:_ Not Provided
Referrer: forum-search:Permission denied (publickey)
Comments
-
Hey @scottww! Thanks for reporting this issue and sorry for getting back to you so late.
I understand that you'd like to use a key stored in 1Password for commit signing. Are you still experiencing the issue you're describing? If so could you run
git commit -S --allow-empty -m"Test"
in one of your local clones of your GitHub repos and look into the 1Password app's logs?You can find the logs by opening your 1Password app and navigating to "Help" -> "Troubleshooting" -> "Open Logs Folder". Can you post the log lines you see that are related to ssh?
0