git 如何在 IntelliJ 中使用 Bitbucket 作为存储库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44642188/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 05:02:09  来源:igfitidea点击:

How to use Bitbucket as a repository in IntelliJ

gitintellij-ideabitbucketjetbrains-ide

提问by Luke101

I have tried to add Bitbucket as a repository in IntelliJ (here). However, I came across errors pushing code. I figured out that Bitbucket only allows reading when using access keys.

我曾尝试将 Bitbucket 添加为 IntelliJ 中的存储库(此处)。但是,我遇到了推送代码的错误。我发现 Bitbucket 只允许在使用访问密钥时读取。

access keys

访问密钥

So, I found a plugin that allows IntelliJ to communicate with Bitbucket. But, this plugin has been discontinued. Is there any other way to use Bitbucket with IntelliJ?

所以,我找到了一个插件,允许 IntelliJ 与 Bitbucket 通信。但是,这个插件已经停产了。有没有其他方法可以将 Bitbucket 与 IntelliJ 一起使用?

回答by mkasberg

Bitbucket is just Git. IntelliJ supports Git.

Bitbucket 只是 Git。IntelliJ 支持 Git。

You are in the wrong section of Bitbucket. You don't want an "Access key" you want to add an SSH key to your user profile. SSH Keys added to your profile can be used for both reads and writes: Use SSH to avoid password prompts when you push code to Bitbucket.

您在 Bitbucket 的错误部分。您不需要“访问密钥”,而是要将 SSH 密钥添加到您的用户配置文件中。添加到您的配置文件中的 SSH 密钥可用于读取和写入:Use SSH to avoid password prompts when you push code to Bitbucket.

To do this:

去做这个:

  1. Click on your user icon in the bottom left corner, and go to "Bitbucket settings".
  2. Click on "SSH Keys" tab under the "Security" heading of the settings page.
  3. Use the "Add key" button to add your key.
  1. 单击左下角的用户图标,然后转到“Bitbucket 设置”。
  2. 单击设置页面“安全”标题下的“SSH 密钥”选项卡。
  3. 使用“添加密钥”按钮添加您的密钥。

For instructions on how to generate an SSH key, see the BitBucket documentation here.

有关如何生成 SSH 密钥的说明,请参阅此处的 BitBucket 文档。