I am trying to install a git repository with a submodule repository inside it. Let's look at two examples: Super and Sub for this example. So I initialized Super repo, then executed the git submodule add
second repo. I passed the .gitmodules
file using Super repo, so when you do git clone --recursive
, it pulls the submodule down along w / super. Our URLs are currently formatted as follows:
ssh:// user.name@serverUrl /path/to/repo.git
Now let's say that I have 3 users: user.a
, user.b
and user.c
user.a
adds a submodule to the super repo. user.b
is the build server. when user.a
adds a submodule, then user.b
should get the submodule as user.b
(NOT user.a
). The same goes for user.c
, when it clones super, and then does a commit, the log should reflect that it was committed by user.c
, and not as user.a
(who added the submodule). I suspect there is a way to specify the URL of the submodule WITHOUT including user.name as part of the URL. This leads me to my question. How to properly configure my git repository so that the url does not include the username? Presumably this has to do with copying some keys around, I'm just wondering how to do it right.
thank you so much Ben
Ben
source share