【问题标题】:I tried using git config --global url.https://.insteadOf git:// to clone through a firewall,but its not working我尝试使用 git config --global url.https://.insteadOf git:// 通过防火墙进行克隆,但它不起作用
【发布时间】:2015-12-06 06:21:03
【问题描述】:

我试图从 rtems 存储库中克隆

git clone git://git.rtems.org/rtems-source-builder.git

研究所连接有防火墙,所以我尝试了多少次连接超时错误。所以我重新考虑

git:// protocol blocked by company, how can I get around that?

我使用

诊断出问题
curl http://github.com:9418

我得到了这个

curl: (7) Failed to connect to github.com port 9418: Connection timed out

根据帖子证明是我的防火墙导致了问题,所以我进一步关注了帖子并做了这个

git config --global url.https://.insteadOf git://

我又重新输入了

git clone git://git.rtems.org/rtems-source-builder.git

但这对我不起作用,我收到了消息

Cloning into 'rtems-source-builder'...
fatal: https://git.rtems.org/rtems-source-builder.git/info/refs not valid: is this a git repository?

我不明白这是因为 .git 更改为 /info/refs...这是怎么回事?

请有人帮我克隆存储库。

我是linux和git的新手,所以如果你能详细回答会很有帮助......提前谢谢你。

【问题讨论】:

    标签: git


    【解决方案1】:

    如果你只是需要克隆,你可以使用 http。

    git 协议正在使用 ssh,如您所见,它可能被阻止。

    如果可以的话,另一件事是在你的 git 帐户下添加 ssh 密钥,然后再次尝试克隆。

    【讨论】:

    • 是的,我尝试使用 http....git clone git.rtems.org/rtems-source-builder.git 但我仍然收到错误
    • 验证您的存储库是否支持 HTTP。 git 管理员可以阻止任何他想要的协议。
    • 我还尝试添加一个 ssh 密钥...按照help.github.com/articles/generating-ssh-keys/....but 的指导方针,我得到了多少次尝试通过 ssh 连接 .....ssh -T git@github。 com ......ssh:连接到主机 github.com 端口 22:连接超时......
    • 我们如何检查我的存储库是否支持 http
    • 您的公司似乎阻止了这些端口。您需要联系您的 IT 部门进行检查。其纯粹的网络配置
    猜你喜欢
    • 1970-01-01
    • 2016-09-06
    • 2012-03-01
    • 1970-01-01
    • 2018-12-12
    • 1970-01-01
    • 2021-12-09
    • 2018-08-30
    • 1970-01-01
    相关资源
    最近更新 更多