I'm trying to connect git using SSH on ubuntu EC2 instance.
I tried with following steps, I'm getting public key error.
- Generated SSH using command ssh-keygen and added that key in bitbucket.
- Edited ~username/.ssh/authorized_keys and added key generated.
when i run command ssh -T git@bitbucket.org, i see following result,
logged in as user-name You can use git or hg to connect to Bitbucket. Shell access is disabled
If i do git pull in project directory , I'm getting error
git@bitbucket.org: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Help me to get rid of this error.
Note : I tried with following solution, it didn't work. git push origin master: permission denied (public key) error
Note (Updated) :: It works in my local machine(windows) with SSH key.