Cloning repositories with submodules


#1

Hi all,

My application is currently cloning via the following command:

git clone --recurse-submodules https://x-access-token:<token>@mygithub.com/repo.git

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 = https://mygithub.com/org/submodulerepo.git
	branch = master

#2

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


#3

Something like this could work:

[url "https://x-access-token:<token>@mygithub.com/"]
    insteadOf = https://mygithub.com/

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


#4

more details »

WEBINAR ALERT

When

Tue Oct 2, 2018

Video call

Join video call

Calendar

githubplatform+1e2af69789d9060e4086a175df505ae9@discoursemail.com

Who

David Baumia - organizer

David Scott Baumia

GitHub Platform Forum

David Scott Baumia

David Scott Baumia

Access to live room link:
https://events.genndi.com/live/169105139238450251/b3b876d908/0/gM84918943dx

Webinar:
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 githubplatform+1e2af69789d9060e4086a175df505ae9@discoursemail.com 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 https://www.google.com/calendar/ and control your notification settings for your entire calendar.

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