gpt4 book ai didi

仅在 Bower 安装期间 Git 身份验证失败(退出代码 #128)

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

我正在构建一个将 Git 存储库作为依赖项的项目:

"dependencies": {
"base-resources": "git@git.companyname.com:bower-projects/base-resources.git"
}

构建失败如下:

bower ECMDERR Failed to execute "git ls-remote --tags --heads git@git.companyname.com:bower-projects/base-resources.git", exit code of #128 Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,password). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

Additional error details: Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

但是,我可以从 Git bash 运行相同的命令而不会出现任何问题:

git ls-remote --tags --heads git@git.companyname.com:bower-projects/base-resources.git

我已经尝试了所有常见的解决方案,such as changing the Git URL protocol ,清除 Bower 缓存,并为此主机设置特定的本地 SSH 配置选项:

Host git.companyname.com
RSAAuthentication yes
IdentitiesOnly yes
IdentityFile ~/.ssh/gitlab_rsa
User git

我还应该检查哪些其他问题?

最佳答案

我的解决方案最终是使用 Git bash 而不是 Windows 终端(在我的例子中是 ConEmu)。两个系统之间对 SSH key 的处理有所不同。

关于仅在 Bower 安装期间 Git 身份验证失败(退出代码 #128),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34138673/

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