gpt4 book ai didi

git - 无法从 Vagrant box 上的 Git 克隆

转载 作者:太空狗 更新时间:2023-10-29 14:46:12 25 4
gpt4 key购买 nike

$ git clone git@github.com:package/my-package.git my-project

Cloning into 'myproject'...

ssh: connect to host github.com port 2222: Connection timed out

fatal: Could not read from remote repository.

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

在我创建第二台 Vagrant 机器之前,我能够做到这一点。我已经删除了第二台机器,但我仍然无法 git-clone。

我试过将端口更改为 2300,但没有用。

最佳答案

默认情况下,通过 SSH 连接 Vagrant box 时使用端口 2222。例如,连接 到 GitHub 应该使用标准 SSH 端口 (22)。

从您的问题中不清楚您在哪里将 Git 配置为使用端口 2222 进行出站连接,但应该改回原样。

关于git - 无法从 Vagrant box 上的 Git 克隆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25755400/

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