Closed kyzh closed 10 years ago
as the git-protocol is a sort-of-default when referencing submodules i'd suggest that you yourself workaround that issue: http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/
otherwise should we switch to plain HTTP for when HTTPS does not work... ;)
I don't have a proxy available unfortunately. I'm happy to keep on using sed, in case that would help someone, here what I'm doing.
find . -name .gitmodules |xargs sed -i 's/git:\/\//https:\/\//g'
Go to asset/* and initialise the submodule
git submodule update --init
Rinse and repeat
(i still think that this is a special case and we should stick to what the mainstream dows/what people expect) :)
@kyzh what exactly is your problem? is the git protocol blocked by a firewall? can you show the error?
i would be fine with switching to http/https but doesn't http urls require you to type a username/password on every clone/update of the project being referenced by a http(s) url?
@Dieterbe i started by trying to install anthracite as so:
git clone --recursive https://github.com/Dieterbe/anthracite.git
The full trace :
git clone --recursive https://github.com/Dieterbe/anthracite.git
Cloning into 'anthracite'...
remote: Counting objects: 606, done.
remote: Compressing objects: 100% (345/345), done.
remote: Total 606 (delta 280), reused 575 (delta 250)
Receiving objects: 100% (606/606), 808.43 KiB | 686 KiB/s, done.
Resolving deltas: 100% (280/280), done.
Submodule 'assets/timeserieswidget' (https://github.com/Dieterbe/timeserieswidget.git) registered for path 'assets/timeserieswidget'
Submodule 'python-dateutil' (git://github.com/paxan/python-dateutil.git) registered for path 'python-dateutil'
Submodule 'rawes' (git://github.com/humangeo/rawes.git) registered for path 'rawes'
Submodule 'requests' (git://github.com/kennethreitz/requests.git) registered for path 'requests'
Cloning into 'assets/timeserieswidget'...
remote: Counting objects: 496, done.
remote: Compressing objects: 100% (182/182), done.
remote: Total 496 (delta 323), reused 485 (delta 314)
Receiving objects: 100% (496/496), 1005.97 KiB | 523 KiB/s, done.
Resolving deltas: 100% (323/323), done.
Submodule path 'assets/timeserieswidget': checked out '637b02a5bd69b1905d951b2b224b5183df917a71'
Submodule 'flot' (git://github.com/flot/flot.git) registered for path 'flot'
Submodule 'rickshaw' (git://github.com/shutterstock/rickshaw.git) registered for path 'rickshaw'
Submodule 'timezone-js' (git://github.com/mde/timezone-js.git) registered for path 'timezone-js'
Cloning into 'flot'...
fatal: unable to connect to github.com:
github.com[0: 204.232.175.90]: errno=Connection refused
Clone of 'git://github.com/flot/flot.git' into submodule path 'flot' failed
Cloning into 'python-dateutil'...
fatal: unable to connect to github.com:
github.com[0: 204.232.175.90]: errno=Connection refused
Clone of 'git://github.com/paxan/python-dateutil.git' into submodule path 'python-dateutil' failed
I definitely did not had to insert user/password on a clone operation. Here is an example of me editing the .gitmodules and cloning the repo. https://gist.github.com/kyzh/5452491
I think you only get prompted to login when you push upstream, not when you pull data. I also need to make sure that i don't have any local (read environment) that would skip login bit
Edit: Added the traces, removed the command saying i will add the traces.
I found a lovely little hack somewhere on the web for this too:
git config --global url."https://".insteadOf git://
autoreplaces ANY git:// url with https:// instead - works great so far...
Thanks @pdaugavietis , I will give it a try :heart:
:clap: to @pdaugavietis nice workaround
I cannot clone timeserieswidget (actually via anthracite dependency). The solution is to use https instead of git within the .gitmodules. I'm not sure anyone would complain about it as the fix is trivial. Equally I don't know any disadvantages of HTTPS over git protocol. PR to follow.