Eclipse Che 7 版本控制

Eclipse Che 7 版本控制

Scroll Down

EclipseChe本机支持VS代码SCM模型。默认情况下,EclipseChe将本机VS CodeGit扩展作为源代码管理(SourceCodeManagement,SCM)提供程序。

通过HTTPS访问Git存储库

前提

Procedure

git clone <link>

通过SSH访问Git存储库

前提

Generating an SSH key

  • view -> command 执行 SSH: generate key pair command, 或者生成仅与特定Git提供程序一起工作的密钥, view -> command 执行 SSH: generate key pair for particular host.
  • 生成密钥后,单击View按钮并从编辑器复制公钥.
  • 将公钥添加到Git提供程序。

将关联公钥添加到GitHub上的存储库或帐户

  • 导航到 github.com.
  • 单击窗口右上角用户图标旁边的下拉箭头。
  • Click Settings → SSH and GPG keys and then click the New SSH key button.
  • In the Title field, type a title for the key, and in the Key field, paste the public key copied from Che.
  • Click the Add SSH key button.

将关联的公钥添加到GitLab上的Git存储库或帐户

  • Navigate to gitlab.com.
  • Click the user icon in the top-right corner of the window.
  • Click Settings → SSH Keys.
  • In the Title field, type a title for the key and in the Key field, paste the public key copied from Che.
  • Click the Add key button.

使用GitHub PR插件管理拉请求

要管理GitHub拉出请求,VS代码GitHub拔出请求插件在工作区的插件列表中可用。

  • 使用GitHub拉出请求插件,
    • 通过运行GitHub拉请求进行身份验证:
    • 手动提供身份验证响应命令并粘贴GitHub令牌。
  • 在生成令牌时选择存储库权限。
    • 创建一个新的拉请求打开GitHub存储库。为了能够执行远程操作,存储库必须具有一个带有SSH URL的远程。
    • 签出一个新分支并进行要发布的更改。
    • 执行GitHub Pull Requests: Create Pull Request 创建拉请求命令。