0

As in the title. What I did :

  1. eval $(ssh-agent -s)

    result:

    Agent pid 457

  2. ssh-add ~/.ssh/sshKey Works fine.

  3. ssh-add -l -E sha256 Gives proper key from the folder.

  4. git push origin master

    result:

    git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.

ssh git@github.com works fine. (info about successful auth but not providing shell access)

I tried the same thing with the addition of testing if git clone works on the same repo. - It does.

I also made a brand new SSH key and added it to my account but it resulted in the same error as in '4.'.

I expect to do a proper git push and save my progress.

N_C_Pub
  • 1
  • 1
  • 1
    Have you checked the [Github troubleshooting guide](https://docs.github.com/en/authentication/troubleshooting-ssh/error-permission-denied-publickey)? – Mushroomator Jul 21 '23 at 22:41
  • Yup. :) Did everything on the list. It should work theoretically. – N_C_Pub Jul 21 '23 at 22:51
  • 1
    Have you set the user name and email in the `.gitconfig`? Also this thread might help [Git: How to solve Permission denied (publickey) error when using Git?](https://stackoverflow.com/questions/2643502/git-how-to-solve-permission-denied-publickey-error-when-using-git) – Mushroomator Jul 21 '23 at 22:57
  • If you mean `git config` command then yes - I set up name and email – N_C_Pub Jul 21 '23 at 23:25
  • Run with ssh debug output: `GIT_SSH_COMMAND="ssh -vvv" git push` and check what that does and what `ssh -vvv git@github.com` uses. Silly question, but do you have write permission to the repository? – Robert Jul 24 '23 at 03:14

0 Answers0