Cloning repositories with submodules


Hi all,

My application is currently cloning via the following command:

git clone --recurse-submodules https://x-access-token:<token>

This works fine when the repository has no submodules or the submodules use a relative path. However, if the repository contains a submodule which points to another repository (see below) then my application will be prompted to supply a password with the above command. Is there something I should be doing in these cases? Do I need to recursively modify .gitmodules to include the token for applicable URLs?

[submodule "foobar"]
 	path = foobar
	url =
	branch = master


This post was flagged by the community and is temporarily hidden.


Something like this could work:

[url "https://x-access-token:<token>"]
    insteadOf =

Passing it to git via -c should also work since this is more of a temporary thing.


more details »



Tue Oct 2, 2018

Video call

Join video call



David Baumia - organizer

David Scott Baumia

GitHub Platform Forum

David Scott Baumia

David Scott Baumia

Access to live room link:

Presenter(s):Neil Patel
Time:10:00 am-Eastern Time (US and Canada), GMT -4

Going? Yes - Maybe - No more options »

Invitation from Google Calendar

You are receiving this courtesy email at the account because you are an attendee of this event.

To stop receiving future updates for this event, decline this event. Alternatively you can sign up for a Google account at and control your notification settings for your entire calendar.

Forwarding this invitation could allow any recipient to modify your RSVP response. Learn More.