I am sitting on a proxy which only allows http/https traffic only, I am able to clone a repository from Github, but I have to fetch/push using the https URL and username/password.
Now my issues is a repository with submodules, when I execute git submodule update
it times out, and I can only assume this is because it's using an SSH connection which is blocked. (it doesn't even ask me for a password on private repos)
In order to update an existing Git submodule, you need to execute the “git submodule update” with the “–remote” and the “–merge” option. Using the “–remote” command, you will be able to update your existing Git submodules without having to run “git pull” commands in each submodule of your project.
Submodules are very static and only track specific commits. Submodules do not track git refs or branches and are not automatically updated when the host repository is updated.
git submodule sync synchronizes all submodules while git submodule sync -- A synchronizes submodule "A" only. If --recursive is specified, this command will recurse into the registered submodules, and sync any nested submodules within.
Edit your .gitmodules
file with the https url, for example:
[submodule "vendor/engines/fat_free_crm"] path = vendor/engines/fat_free_crm url = https://github.com/fatfreecrm/fat_free_crm.git
Then run git submodule sync
to reflect the change to your .git/config
file.
Credits: https://stackoverflow.com/a/6632693/1273077
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With