[IPython-dev] submodules over https
Dave Hirschfeld
dave.hirschfeld at gmail.com
Thu May 2 04:40:47 EDT 2013
If you're behind a firewall or otherwise can't use the git protocol but
instead use https access you may get an error message similar to below when
trying to update to the latest IPython:
updating git submodules
Submodule 'components' (git://github.com/ipython/ipython-components.git)
registered for path 'IPython/frontend/html/notebook/stat
ic/components'
Cloning into 'IPython/frontend/html/notebook/static/components'...
fatal: unable to connect to github.com:
github.com[0: 204.232.175.90]: errno=No error
Clone of 'git://github.com/ipython/ipython-components.git' into submodule
path 'IPython/frontend/html/notebook/static/components' failed
Traceback (most recent call last):
File "setupegg.py", line 6, in <module>
execfile('setup.py')
File "setup.py", line 129, in <module>
ensure_submodules_exist()
File "setup.py", line 127, in ensure_submodules_exist
update_submodules()
File "C:\dev\code\ipython\setupbase.py", line 396, in update_submodules
subprocess.check_call('git submodule update --recursive'.split())
File "C:\dev\bin\Python27\lib\subprocess.py", line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'submodule', 'update', '--
recursive']' returned non-zero exit status 1
To fix this you'll need to edit your config file which can be found in the
top-level .git folder. The [submodule "components"] section which looks
like:
[submodule "components"]
url = git://github.com/ipython/ipython-components.git
...needs to be changed to:
[submodule "components"]
url = https://github.com/ipython/ipython-components.git
If you immediately try to update the submodules you'll likely get the
following error:
C:\dev\code\ipython [master +1 ~0 -0 !]> git submodule update --recursive
fatal: Needed a single revision
Unable to find current revision in submodule path
'IPython/frontend/html/notebook/static/components'
Translated, this means that there's a failed submodules checkout blocking
the update and you need to delete the
IPython\frontend\html\notebook\static\components directory.
After that the error message you get will change to:
C:\dev\code\ipython [master +1 ~0 -1 !]> git submodule update --recursive
fatal: unable to connect to github.com:
github.com[0: 204.232.175.90]: errno=No error
Unable to fetch in submodule path
'IPython/frontend/html/notebook/static/components'
...which means you need to edit the config file for the specific submodule,
in this case it can be found in the .git\modules\components\config
directory.
The [remote "origin"] section which looks like:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git://github.com/ipython/ipython-components.git
...needs to be changed to:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = https://github.com/ipython/ipython-components.git
After all this it should hopefully work!
Since this is a bit of a hassle it might be nice if the https url could be
used by default for submodules as I assume it will just work for everyone
and anyone who cares is probably the most capable of switching it back.
HTH,
Dave
More information about the IPython-dev
mailing list