git子模块通过ssh错误更新

时间:2018-06-21 19:24:09

标签: python django github clone cpanel

在cpanel中安装了python和django之后,我克隆了commcare-hq应用程序。这是链接:https://github.com/dimagi/commcare-hq,但是每当我输入以下命令

git submodule update --init --recursive

我遇到以下错误

fatal: clone of 'git://github.com/dimagi/xml2json.git' into submodule path 
'/home/hcdcnetl/myProject/commcare-hq/submodules/xml2json' failed
Failed to clone 'submodules/xml2json'. Retry scheduled
Cloning into '/home/hcdcnetl/myProject/commcare- 
hq/corehq/apps/hqmedia/static/hqmedia/MediaUploader'...
fatal: unable to connect to github.com:
github.com[0: 192.30.253.113]: errno=Connection refused
github.com[1: 192.30.253.112]: errno=Connection refused

1 个答案:

答案 0 :(得分:0)

git://github.com不是SSH URL,它是Git协议URL。

尝试

git config --global url."git@github.com/".insteadOf git://github.com/

任何git://github.com/都将替换为SSH URL git@github.com/...