如何使用intellij推送到bitbucket [英] How to push to bitbucket using intellij

查看:308
本文介绍了如何使用intellij推送到bitbucket的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在bitbucket中创建了一个项目,并试图使用intellij git来推送代码。当我创建项目时,bitbucket给了我在git中运行的命令。以下是我运行的命令和我得到的错误:

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.


权限被拒绝(publickey)。致命:无法从远程
存储库读取。

Permission denied (publickey). fatal: Could not read from remote repository.

请确保您拥有正确的访问权限并且存储库
存在。

Please make sure you have the correct access rights and the repository exists.

任何想法?

推荐答案

那是因为您正在通过ssh创建项目,因此您需要创建并注册SSH密钥。

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

创建ssh密钥

如果你不想这样,只能通过https

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

这篇关于如何使用intellij推送到bitbucket的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆