AWS CodeCommit 的 Git GUI

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32147190/
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-19 11:17:45  来源:igfitidea点击:

Git GUI for AWS CodeCommit

gitamazon-web-servicesaws-codecommit

提问by Teo

Is there any good GUI that I can use with AWS CodeCommit(Amazon's new Git Service)?

有什么好的 GUI 可以与AWS CodeCommit(亚马逊的新 Git 服务)一起使用?

I've tried SmathGit and GitHub for windows.

我已经为 Windows 尝试过 SmathGit 和 GitHub。

回答by Steffen Opel

While AWS CodeCommitsupports the common Git connection protocols HTTPS and SSH, the details can be slightly peculiar and Setting Up for AWS CodeCommitwill vary depending on what connection protocol you want to use when connecting to an AWS CodeCommit repository, and on the operating system you use, as usual:

虽然AWS CodeCommit支持常见的 Git 连接协议 HTTPS 和 SSH,但详细信息可能有些特殊,AWS CodeCommit 的设置将根据您在连接到 AWS CodeCommit 存储库时要使用的连接协议以及您使用的操作系统而有所不同。像往常一样使用

If you have not yet created any AWS CodeCommit repositories, [...] then the following list can help you decide which type of connection to set up for.

  • HTTPS: With HTTPS connections, you allow Git to use a cryptographically signed version of your IAM user credentials or Amazon EC2 instance role whenever Git needs to authenticate with AWS in order to interact with repositories in AWS CodeCommit. To do this, you configure a credential helper for Git on your local machine. A credential helper is included in the AWS CLI on Linux, OS X, or Unix, and included as part of the AWS AWS SDK for .NET for Windows operating systems. [...]

  • SSH: With SSH connections, you create public and private key files on your local machine that Git and AWS CodeCommit use for SSH authentication. You associate the public key with your IAM user. You store the private key on your local machine. Because SSH requires manual creation and management of public and private key files, you might find HTTPS simpler and easier to use with AWS CodeCommit.

[emphasis mine]

如果您尚未创建任何 AWS CodeCommit 存储库,[...] 那么以下列表可以帮助您决定要设置哪种类型的连接。

  • HTTPS:通过 HTTPS 连接,只要 Git 需要向 AWS 进行身份验证以与 AWS CodeCommit 中的存储库进行交互,您就允许 Git 使用加密签名版本的 IAM 用户凭证或 Amazon EC2 实例角色。为此, 您需要在本地计算机上为 Git 配置凭证帮助程序。凭证帮助程序包含在 Linux、OS X 或 Unix 上的 AWS CLI 中,并作为适用于 Windows 操作系统的适用于 .NET 的 AWS AWS 开发工具包的一部分包含在内。[...]

  • SSH:通过 SSH 连接,您可以在本地计算机上创建公共和私有密钥文件,Git 和 AWS CodeCommit 将这些文件用于 SSH 身份验证。您将公钥与您的 IAM 用户相关联。您将私钥存储在本地计算机上。由于 SSH 需要手动创建和管理公有和私有密钥文件,您可能会发现 HTTPS 与 AWS CodeCommit 一起使用更简单、更容易。

[强调我的]

The two emphasized fragments highlight the minor yet relevant differences to using either connection protocol with most other hosted Git providers like Bitbucketor GitHub.

这两个强调的片段突出了使用任一连接协议与大多数其他托管 Git 提供商(如BitbucketGitHub )的微小但相关的差异。

In contrast to the recommendation by AWS, I personally consider setting up the mentioned credentials helper for HTTPSmore involved than simply adding your public SSH key(s) to your AWS IAM user (step 5.), after all, I'm using them for Git all over the place anyway - this depends on what you are used to and personal preference of course.

与 AWS 的建议相反,我个人认为为 HTTPS 设置上述凭证助手简单地将您的公共 SSH 密钥添加到您的 AWS IAM 用户(第 5 步)更复杂,毕竟,我正在使用它们无论如何,对于到处都是 Git - 这当然取决于您的习惯和个人喜好。

  • The important aspect to be aware of for SSH usage on Windows (for example with SourceTree, see below) is that you need to embed the SSH key id into the clone URL:
    git clone ssh://[email protected]/v1/repos/MyDemoRepo my-demo-repo
  • 在 Windows 上使用 SSH 需要注意的重要方面(例如 SourceTree,见下文)是您需要将 SSH 密钥 ID 嵌入到克隆 URL 中:
    git clone ssh://[email protected]/v1/repos/MyDemoRepo my-demo-repo

Generic GUI client

通用 GUI 客户端

Any sufficiently open/generic client for Git that supports SSH should be able to use AWS CodeCommit in turn (no matter whether the client is GUI or CLI based), though usability and versatility varies.

任何支持 SSH 的足够开放/通用的 Git 客户端都应该能够依次使用 AWS CodeCommit(无论客户端是基于 GUI 还是基于 CLI),尽管可用性和多功能性各不相同。

A popular GUI client that nicely supports Bitbucket, GitHub and most other public Git providers including AWS CodeCommit is Atlassian's free Git & Mercurial client for Windows or Mac, SourceTree.

一个流行的 GUI 客户端很好地支持 Bitbucket、GitHub 和包括 AWS CodeCommit 在内的大多数其他公共 Git 提供商是 Atlassian 的免费 Git & Mercurial 客户端,适用于 Windows 或 MacSourceTree

  • Please note that in contrast to SourceTree, GitHub Desktopdoes not seem to support directly connecting to any Git provider other than GitHub itself at this point (at least it seems possible to add any local repository that has previously been cloned via some other client though).
  • 请注意,与 SourceTree 相比,GitHub Desktop目前似乎不支持直接连接到除 GitHub 本身以外的任何 Git 提供者(但至少似乎可以添加以前通过其他客户端克隆的任何本地存储库) .