Reputation: 65238
I have created a project in bitbucket and trying to push code using intellij git. When I created the project bitbucket gave me commands to run within git. Here are the commands I ran and the error I got:
git remote add origin ssh://[email protected]/[username]/[repo]
git push -u origin master
This looks strange because how is this command suppose to authenticate me? Now here is error I got.
Permission denied (publickey). fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Any ideas?
Upvotes: 0
Views: 5169
Reputation: 21
Do you have the ssh key added to your computer? If you're using oSX El Capitan or newer you'll need to add these every time you restart. osx ssh keys
How to add ssh keys
Upvotes: 2
Reputation: 1138
That is because you are creating your project via ssh and for that you need to create and registrate SSH keys.
If you don't want that, create your project only via https
Upvotes: 4