gpt4 book ai didi

git:无法克隆私有(private)存储库,错误:找不到存储库

转载 作者:太空狗 更新时间:2023-10-29 13:15:55 27 4
gpt4 key购买 nike

我的一个 friend 将我作为合作者添加到他在 Github 上的项目中。我能够看到 repo 协议(protocol),但是当我尝试用这个克隆时:

git clone https:/github.com/FriendsUserName/FriendsRepo.git

获取错误:

remote: Repository not found.
fatal: repository https:/github.com/FriendsUserName/FriendsRepo.git not found

我已成功设置多个 Github 帐户,来自这篇文章 - Github for work and play (multiple accounts)

有没有人遇到过这个问题?

我也尝试过 fork repo 然后克隆。但是克隆仍然遇到同样的错误。

最佳答案

晚会有点晚了,但我遇到了与提问者完全相同的情况,所以也许我设法做到这一点的方式会对某人有所帮助。

问题中提到的教程涉及为不同的 Github 帐户创建别名,例如work.github.com用于您的工作帐户和me.github.com为你的个人。

因此,在这种情况下,您克隆存储库的方式应该是(假设它用于您的个人帐户):

git clone https:/me.github.com/FriendsUserName/FriendsRepo.git

但是,即使那样对我也不起作用。

起作用的是使用别名和 ssh url 进行克隆,即

git clone git@me.github.com/FriendsUserName/FriendsRepo.git

如果这仍然不起作用,请尝试查看您是否确实连接了正确的帐户:

ssh -T git@me.github.com

对此的回应应该是:

Hi <username for personal account here>! You've successfully authenticated, but GitHub does not provide shell access.

祝你好运!

关于git:无法克隆私有(private)存储库,错误:找不到存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35079861/

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