7

I have an umbrella repo containing a number of submodules. I am using

git clone --recurse-submodules --remote-submodules https://<access_token>@github.com/user/repo.git 

to recursively clone all submodules. On Ubuntu, I am asked for the credentials of each submodule although they all can be accessed using the same access token, which I have tested by cloning them individually. Side note: I am asked for username and password, which have not been accepted anymore by GitHub since August, 13th. On Windows, where Git was installed as part of Visual Studio, I only need to provide the access token once for the umbrella repo.

I already tried to use the Git credential cache, but that did not work:

git config --global credential.helper cache 

How can I clone the submodules recursively with providing the access token only once?

1 Answer 1

7

You can do

git config --system credential.helper store echo "https://username:[email protected]" > ~/.git-credentials git clone --recurse-submodules https://github.com/org/repo repo 

Now cloning the main repo and submodules from github.com will use this token.

Sign up to request clarification or add additional context in comments.

1 Comment

the sub-module still doesn't use the token

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.