Anybody seen this error and know what to do?
I'm using the terminal, I'm in the root, the GitHub repository exists and I don't know what to do now.
> git push -u origin master Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Always use the "git" user$ ssh -T [email protected] > Permission denied (publickey). If your connection failed and you're using a remote URL with your GitHub username, you can change the remote URL to use the "git" user. You should verify your connection by typing: $ ssh -T [email protected] > Hi username!
If you want to use a password to access the SSH server, a solution for fixing the Permission denied error is to enable password login in the sshd_config file. In the file, find the PasswordAuthentication line and make sure it ends with yes . Find the ChallengeResponseAuthentication option and disable it by adding no .
The “Permission denied (publickey). fatal: Could not read from remote repository” error is caused by an issue with the way in which you authenticate with a Git repository. To solve this error, make sure your key is being used on your Git account. If it is not, add your key to Git.
GitHub isn't able to authenticate you. So, either you aren't setup with an SSH key, because you haven't set one up on your machine, or your key isn't associated with your GitHub account.
You can also use the HTTPS URL instead of the SSH/git URL to avoid having to deal with SSH keys. This is GitHub's recommended method.
Further, GitHub has a help page specifically for that error message, and explains in more detail everything you could check.
I know about this problem. After add ssh key, add you ssh key to ssh agent too (from official docs)
ssh-agent -s ssh-add ~/.ssh/id_rsa
After it all work fine, git can view proper key, before couldn't.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With