git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git submodules with usernames in the URL

From
Ttillmann.crueger@telekom.de <tillmann.crueger@telekom.de>
Date
Feb 14, 2012, 13:26 UTC
Message-ID
<E76DF6102FDBC04BA291EAE9A3BAECB50137C2AC6530@HE111540.emea1.cds.t-internal.com>
Hi,
I already had a look at the mailinglist archive, but I could not find any mention of this problem. There is a posting on Stackoverflow.com about this (http://stackoverflow.com/questions/7714326/git-submodule-url-not-including-username) with a workaround, but it would nice to have an official position.
Here is the problem:
When I am using git-submodule over an authorized https it is convenient to be able to specify the username directly in the url in the form https://user@domain.com/path/to/repo. So I am able to do a 
> git submodule add https://user@domain.com/path/to/repo
Howver if I do this, the username becomes baked into the URL of the submodule, so other people working with the repository will not be able to use the submodule and have to change the URL first.
Is there an actual rationale for including the username in the URL in this case, or is this just because it is simpler than removing it?
One thing I noticed, is that automatically removing it would basically eliminate the convinience for the person who has been using that URL in the first place. If the username was removed every update would have to query the username again. Also having a username in the repo could be correct, in case this isn't a real user, but a role for using that repository.
Still I feel that having a username within a repository is hardly ever what someone wants and most often a mistake. For now I will try to educate everybody about this and fix all repositories where this goes wrong, but a better solution would be nice to have.
Thanks for your time,
  Till
Next: Michael Schubert
Message 1 of 2 in “Git submodules with usernames in the URL”
  1. tillmann.crueger@telekom.deFeb 14, 2012
  2. Michael SchubertFeb 14, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.