Reputation: 1129
I'm trying certain git operations, such as pull
, push
etc but none works:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Things I have done:
Checked whether the remotes were ssh's: git remote -v
origin [email protected]:USERNAME/REPOSITORY.git (fetch)
origin [email protected]:USERNAME/REPOSITORY.git (push)
Checked if the ssh agent is running: eval "$(ssh-agent -s)"
Agent pid 123456
Added the private key to ssh agent: ssh-add "path_to_private_key_file"
Identity added: "path_to_private_key_file" ([email protected])
Added the public key to Github at "https://github.com/settings/ssh/new"
Checked whether ssh connection is working: ssh -T [email protected]
Hi USERNAME! You've successfully authenticated, but GitHub does not provide shell access.
Upvotes: 1
Views: 926
Reputation: 1323793
Assuming that:
GIT_SSH
%PATH%
references C:\Program Files\Git\usr\bin\ssh.exe
firstMake sure that:
[email protected]:me/myRepo
%USERNAME%\.ssh\config
file which set a the right private key file path, assuming it is not the default one (id_rsa
).That config file would be (again, only if the private key is nont the default one):
Host github.com
Hostname github.com
User git
IdentityFile C:\path\to\private\key\file
Upvotes: 0