AWS CodeCommit与git-remote-codecommit的结合

11

这个页面对您解决问题有帮助吗?https://docs.aws.amazon.com/codecommit/latest/userguide/troubleshooting-grc.html - Abraham Luna
我也遇到同样的问题,已经通过pip3卸载和重新安装,Python3已经默认在路径中了,但它仍然失败了。这真让人费解。不过我的设备是M1的Big Sur系统。 - CyberMew
这对我也有效,Mac OS。 - 王铱辰
9个回答

14

1
这对我有效! - Leonardo Wildt

7

我曾有类似的问题。事实证明,一些 git-remote-codecommit 扩展已经被安装但是无法使用。

我通过以下步骤解决了这个问题:

  1. 卸载:pip3 uninstall git-remote-codecommit
  2. 重新安装:pip3 install git-remote-codecommit

安装过程会检查 Python3 是否位于您的 $PATH 中,如果没有,您需要将其添加到其中。

这种方法对我解决了此问题。


我决定通过使用brew安装git并打开一个新的终端窗口来更改我的git安装方式:brew install git - Michael Behrens
感觉就像重新启动来修复问题一样,但它起作用了! - Eva Donaldson

3

3
我尝试卸载git-remote-codecommit并找到其安装路径。
C:\Users\user>pip3 uninstall git-remote-codecommit
Found existing installation: git-remote-codecommit 1.16
Uninstalling git-remote-codecommit-1.16:
  Would remove:
    c:\users\user\appdata\roaming\python\python39\scripts\git-remote-codecommit-script.py
    c:\users\user\appdata\roaming\python\python39\scripts\git-remote-codecommit.exe
    c:\users\user\appdata\roaming\python\python39\site-packages\git_remote_codecommit-1.16-py3.9.egg-info
    c:\users\user\appdata\roaming\python\python39\site-packages\git_remote_codecommit\*

当我将这个路径加入环境变量时,它就能工作了。
c:\users\user\appdata\roaming\python\python39\scripts\

3

需要在终端中运行以下命令来解决这个问题:pip3 install git-remote-codecommit 或者 pip install git-remote-codecommit


1

当我使用带有--user标志的pip安装git-remote-codecommit时,我遇到了相同的问题,它将软件包安装在主目录中。

pip install git-remote-codecommit --user

我通过将Python脚本路径添加到PATH环境变量来解决了这个问题。

C:\Users\{HOME_DIR}\AppData\Roaming\Python\Python37\Scripts


我的问题是还要添加环境变量。虽然我的路径不同,但是是C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\Scripts。 - Ali Mohsan

1

你的回答可以通过附加支持信息来改进。请[编辑]以添加更多细节,例如引用或文档,以便他人可以确认您的答案是否正确。您可以在帮助中心中找到有关编写良好答案的更多信息。 - Community

0
我在Mac上遇到了同样的问题。我使用homebrew安装了"git-remote-codecommit",而不是使用pip3,并使用以下命令成功安装。通过这种方法,无需手动设置PATH变量。在安装过程中可能会看到警告/错误信息(安装需要几分钟,请耐心等待)。顺便说一下,我使用的是Python 3.9.6。
brew install git-remote-codecommit

-1
在我的情况下,我设置了远程URL。
$ git remote set-url origin https://git-codecommit.*******/v1/repos/My-Project

我添加了一个提交并推送到主分支

git push origin master

它可以工作


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接