gpt4 book ai didi

git - 无需设置凭证助手的 AWS CodeCommit HTTPS 访问

转载 作者:太空狗 更新时间:2023-10-29 13:50:17 25 4
gpt4 key购买 nike

我们正在从 GitHub 过渡到 AWS CodeCommit 以拥有一个紧密集成的环境。

一种需求是通过 HTTPS 访问一个存储库。这个 repo 是通过 ny Spring Cloud Config Server 产品访问的,它使用 jgit 读取 repo 并克隆文件以供使用。

AWS CodeCommit 显然需要在通过 HTTPS 连接时使用凭据帮助程序,但我的设置不是那样的。我想要一个 jgit 可以使用的用户和密码设置,而无需使用凭据帮助程序生成临时凭据。有什么办法可以做到这一点?

有没有什么办法可以配置CodeCommit以固定的用户和密码通过HTTPS访问仓库?

最佳答案

更新

截至 2016 年 12 月 22 日,AWS CodeCommit supports the use of a static user name and password作为一种通过 HTTPS 向您的 AWS CodeCommit 存储库进行身份验证的简化方法:

With Git credentials, you can generate a static user name and password in the Identity and Access Management (IAM) console that you can use to access AWS CodeCommit repositories from the command line, Git CLI, or any Git tool that supports HTTPS authentication.

Because these are static credentials, they can be cached using the password management tools included in your local operating system or stored in a credential management utility. This allows you to get started with AWS CodeCommit within minutes. You don’t need to download the AWS CLI or configure your Git client to connect to your AWS CodeCommit repository on HTTPS. You can also use the user name and password to connect to the AWS CodeCommit repository from third-party tools that support user name and password authentication, including popular Git GUI clients (such as TowerUI) and IDEs (such as Eclipse, IntelliJ, and Visual Studio).

[...]


初始答案

Is there any way to configure CodeCommit to access a fixed user and password to access the repository through HTTPS?

否,如 Setting Up for AWS CodeCommit 中所述,您必须使用 HTTPS 或 SSH,并且前者需要 每当 Git 需要向 AWS 进行身份验证以便与 AWS CodeCommit 中的存储库交互时,您的 IAM 用户凭证或 Amazon EC2 实例角色的加密签名版本.

但是,正如 Mark L. Smith 在对 using native git not jgit in Eclipse git 的回答中提到的那样, 而 These credentials expire in ~15 minutes ,没有什么能阻止你自己实现签名过程,马克好心地提供了一个回应。 显示如何使用 jgit 通过 HTTPS 克隆 AWS CodeCommit 存储库的示例,请参阅 jgit-codecommit了解详情。

关于git - 无需设置凭证助手的 AWS CodeCommit HTTPS 访问,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31862615/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com