Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change git:// protocol in .gitmodules to https:// #5

Closed
msdos opened this issue Mar 29, 2011 · 5 comments
Closed

Change git:// protocol in .gitmodules to https:// #5

msdos opened this issue Mar 29, 2011 · 5 comments

Comments

@msdos
Copy link

msdos commented Mar 29, 2011

In some scenarios (like in some companies), the port which git protocol uses (9418 if I'm correct) is blocked by firewall policies. So, when I try to do a clone to your project (git clone --recursive), I can't receive the files in your submodule, so I receive a broken application.

My suggestion is to use https for the .gitsubmodule file. This submodule isn't that big to "justify" the use of git protocol, and would avoid a lot of problems in a lot of corporate machines/environments.

(Why am I doing a git clone? I'm using pathogen.)

@xolox
Copy link
Owner

xolox commented Mar 29, 2011

Hi and thanks for your feedback! I started using submodules less than a month ago and haven't worked with submodules before. Do you know whether I can just edit the .gitsubmodules file and swap git://github.com/xolox/vim-misc.git with https://github.com/xolox/vim-misc.git?

@msdos
Copy link
Author

msdos commented Mar 29, 2011

Hum, I started using submodules last month too! In theory, I think you just need to do edit .gitmodules and everything will work fine when someone fetches, but I don't know how git is going to handle the modification in .gitmodules if someone already cloned the submodule.

At .git/config, if someone did a git clone --recursive, will have an entry pointing out to the submodule using the git protocol. Don't know how git is going to handle this. I think this is a good question to stackoverflow, I'm going to post there.

@msdos
Copy link
Author

msdos commented Mar 29, 2011

I've searched in SO for some information, and came across this topic:

http://stackoverflow.com/questions/913701/changing-remote-repository-for-a-git-submodule

In theory, doing a git submodule sync should update .git/config, but it doesn't.

My solution is to edit myself the .git/config, and mantain the .gitmodules as is: with the git protocol. I think you can, if afraid of messing up with submodules, to just create an entry in the readme telling pathogen users about this issue and this solution. Changing .git/config is interesting because it isn't versioned, so...

Thanks for the fast reply.

@msdos
Copy link
Author

msdos commented Mar 30, 2011

Although I have used the solution described above, it's not the optimal solution, so it's up to you if you're going to change the .gitmodules file.

Thanks for the plugin!

@xolox
Copy link
Owner

xolox commented Apr 11, 2011

Hi again,

Sorry for taking a while to respond. I just committed 27bef01 which changes the git submodule configuration as you've suggested. Thanks for your feedback and happy Vimming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants