Reputation: 14808
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)
Upvotes: 56
Views: 47533
Reputation: 7276
git submodule sync
to reflect the change to your .git/config file.Example .gitmodules file:
[submodule "vendor/engines/fat_free_crm"]
path = vendor/engines/fat_free_crm
url = https://github.com/fatfreecrm/fat_free_crm.git
Credits: https://stackoverflow.com/a/6632693/1273077
Upvotes: 99
Reputation: 573
If you don't want to manually change the .gitmodules file yourself, you can do it with git CLI now (make sure your git version is not too old).
This will make the changes for you:
git submodule set-url [--] <path> <newurl>
Example:
git submodule set-url somedir https://github.com/somename/somerepo.git
Upvotes: 6
Reputation: 6740
In your .gitmodules
file in the root of your repo, and in the .git/config
file, you should find a section for your submodule. You can edit the url there so it is accessed via https request rather ssh.
Of course it may already be an ssh url, in which case the problem may be something else, but this is the first place to check.
Upvotes: 48