Help us learn about your current experience with the documentation. Take the survey.

安装和设置 GitLab for Eclipse

  • Tier: 等级
  • Offering: 提供方案
  • Status: 状态
This page contains information related to upcoming products, features, and functionality. It is important to note that the information presented is for informational purposes only. Please do not rely on this information for purchasing or planning purposes. The development, release, and timing of any products, features, or functionality may be subject to change or delay and remain at the sole discretion of GitLab Inc.

安装 GitLab for Eclipse 插件

先决条件:

  • Eclipse 4.33 及更高版本。
  • GitLab 版本 16.8 或更高版本。

要安装 GitLab for Eclipse:

  1. 打开您的 Eclipse IDE 和您常用的网页浏览器。
  2. 在您的网页浏览器中,访问 Eclipse Marketplace 中的 GitLab for Eclipse 插件 页面。
  3. 在插件页面上,选择 Install,然后将鼠标拖动到您的 Eclipse IDE 中。
  4. Eclipse Marketplace 窗口中,选择 GitLab For Eclipse 类别。
  5. 选择 Confirm >,然后选择 Finish
  6. 如果出现 Trust Authorities 窗口,选择 https://gitlab.com 更新站点,然后选择 Trust Selected
  7. 选择 Restart Now

如果 Eclipse Marketplace 不可用,请按照 Eclipse 安装说明 添加新的软件站点。对于 Work with,使用 https://gitlab.com/gitlab-org/editor-extensions/gitlab-eclipse-plugin/-/releases/permalink/latest/downloads/

连接到 GitLab

安装扩展后,将其连接到您的 GitLab 账户。

创建个人访问令牌

如果您使用的是 GitLab Self-Managed 实例,请创建一个个人访问令牌。

  1. 在 GitLab 中,在左侧边栏选择您的头像。
  2. 选择 Edit profile
  3. 在左侧边栏,选择 Access tokens
  4. 选择 Add new token
  5. 输入名称、描述和过期日期。
  6. 选择 api 范围。
  7. 选择 Create personal access token

使用 GitLab 进行身份验证

在您的 IDE 中配置插件后,将其连接到您的 GitLab 账户:

  1. 在您的 IDE 中,选择 Eclipse > Settings
  2. 在左侧边栏,选择 GitLab
  3. 提供 Connection URL。对于 GitLab.com,使用 https://gitlab.com
  4. 对于 GitLab Personal Access Token,粘贴您创建的个人访问令牌。 令牌在首次输入时会显示。应用后,令牌不会显示,并使用 Eclipse 安全存储进行存储。
  5. 在 GitLab 设置下,选择 Apply
  6. 选择 Apply and Close