git-remote-codecommit 和 Amazon CodeCommit 疑难解答 - Amazon CodeCommit
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

git-remote-codecommit 和 Amazon CodeCommit 疑难解答

以下信息可帮助您排查在连接 Amazon CodeCommit 存储库时遇到的与 git-remote-codecommit 有关的错误。

我看到一个错误:git: 'remote-codecommit' is not a git command

问题:尝试使用 git-remote-codecommit 时,您看到一个错误,显示“git-remote-codecommit is not a git command. See 'git --help'”。

可能的修复措施:出现此错误的最常见原因是,您没有将 git-remote-codecommit 可执行文件添加到 PATH 中,或者字符串包含语法错误。当 git 和 remote-codecommit 之间缺少连字符,或者在 git-remote-codecommit 之前添加一个额外的 git 时,就可能会发生这种情况。

有关设置和使用 git-remote-codecommit 的更多信息,请参阅使用 git-remote-codecommit 建立到 Amazon CodeCommit 的 HTTPS 连接的设置步骤

我看到一个错误:fatal: Unable to find remote helper for 'codecommit'

问题:尝试使用 git-remote-codecommit 时,您看到一个错误,显示“fatal: Unable to find remote helper for 'codecommit'”。

可能的修复措施:出现此错误的最常见原因包括:

  • git-remote-codecommit 的设置未完成

  • 安装 git-remote-codecommit 的位置不在您的路径中或者没有配置为 Path 环境变量的一部分

  • Python 不在您的路径中或者没有配置为 Path 环境变量的一部分

  • 使用的终端或命令行窗口自安装 git-remote-codecommit 后一直未重新启动

有关设置和使用 git-remote-codecommit 的更多信息,请参阅使用 git-remote-codecommit 建立到 Amazon CodeCommit 的 HTTPS 连接的设置步骤

克隆错误:我无法从 IDE 克隆 CodeCommit 存储库

问题:尝试在 IDE 中克隆 CodeCommit 存储库时,您看到一个错误,指出端点或 URL 无效。

可能的修复:并非所有 IDE 都支持 git-remote-codecommit 在克隆过程中使用的 URL。从终端或命令行本地克隆存储库,然后将该本地存储库添加到 IDE 中。有关更多信息,请参阅步骤 3:连接 CodeCommit 控制台并克隆存储库

推送或拉取错误:我无法将提交从 IDE 推送或拉取到 CodeCommit 存储库

问题:当您尝试从 IDE 中提取或推送代码时,会看到连接错误。

可能的修复:此错误的最常见原因是 IDE 与 Git 远程辅助程序(如 git-remote-codecommit)不兼容。使用 Git 命令从命令行或终端手动更新本地存储库,而不是使用 IDE 功能提交、推送和拉取代码。

有关远程辅助程序和 Git 的更多信息,请参阅 Git 文档