gpt4 book ai didi

git克隆问题[套接字: Address family not supported by protocol ]

转载 作者:行者123 更新时间:2023-12-03 12:07:55 29 4
gpt4 key购买 nike

我在共享主机上(巨大的错误)。我已经 ssh 进入它并尝试从 bitbucket.org 克隆一个私有(private)存储库:

git clone git@example.com:MyStuff/private-repository.git
但面临这个问题:

socket: Address family not supported by protocol

ssh: connect to host bitbucket.org port 22: Address family not supported by protocol


现在看这个页面: https://forums.gentoo.org/viewtopic-t-127306-start-0.html .我想也许我需要通过 ssh 禁用 ipv6 来连接到主机。我不能这样做(共享主机)。
有什么帮助吗?

最佳答案

在这种情况下,我会在 SSL 上使用克隆,就像这样

git clone https://<repo-url>

如果您不想每次都输入密码,那么另一个不错的技巧是,您可以像这样使用凭证助手:

git config --global credential.helper cache
git config --global credential.https://github.com.username foo
git clone https://github.com/foo/repository.git

以上将导致 Git 每 15 分钟询问一次您的密码(默认情况下)。

关于git克隆问题[套接字: Address family not supported by protocol ],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59600992/

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