How to push to bitbucket using intellij

安稳与你 提交于 2019-12-13 07:30:07

问题


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://git@bitbucket.org/[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?


回答1:


That is because you are creating your project via ssh and for that you need to create and registrate SSH keys.

Create ssh key

If you don't want that, create your project only via https




回答2:


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



来源:https://stackoverflow.com/questions/44620646/how-to-push-to-bitbucket-using-intellij

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!