gpt4 book ai didi

Git 子模块 - 权限被拒绝

转载 作者:IT王子 更新时间:2023-10-29 00:34:27 25 4
gpt4 key购买 nike

我无法克隆存在于我的私有(private) git 存储库中的子模块。我确实有权访问整个存储库,

已经使用了下面的命令但是没有用,请帮忙。在现有存储库中克隆子模块的正确方法是什么?

djrecker$ git submodule update --init --recursive
Submodule 'Path' (git@github.com:Path) registered for path 'App'
Cloning into 'Path'...
Permission denied (publickey).
fatal: Could not read from remote repository.

最佳答案

我遇到了同样的问题。问题出在您的 github 存储库上,您可能正在使用一些旧的 ssh key 。

您需要更新当前的 ssh key 。

Steps involved are:

1. vim ~/.ssh/id_rsa.pub
2. copy the ssh key
3. Go to the github settings
4. Select the option ssh keys
5. Remove the old ssh keys not used anymore.
6. Add a new ssh key.
7. Try running the "git submodule update --recursive"

这对我有用!!

关于Git 子模块 - 权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25957125/

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