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

Fwd: Can't override username of default credential context to have different username in custom context.

From
VKVladislav Kostenko <vkostenko@netlabsystems.com>
Date
Apr 27, 2015, 16:19 UTC
Message-ID
<CAK9djV0CqO4sXPMqKCnH3VZFQ4G=XFbNPRF-ZMXjNRLjqfcngw@mail.gmail.com>
Hi,
Here is my scenario:
1. First I set default username
git config --global credential.username myUsername
2. Then I want to have different username for my other repository
git config --global
credential.https://myOtherRepository.visualstudio.com.username
myOtherUsername
3. When I try to pull new changes, git asks for password of myUsername
Password for 'https://myUsername@myOtherRepository.visualstudio.com':

But I want to have: Password for 'https://myOtherUsername@myOtherRepository.visualstudio.com':

Is there any way to accomplish overriding?
PS: I've found that if I change steps 1 and 2 I will get what I want.
But this is not a solution as it require to unset and set
credential.username after I add a new credential context. So the
ordering does matter and it looks for me like it shouldn't.
-- 
Best regards, Vlad.
Next: Jeff King
Message 1 of 3 in “Fwd: Can't override username of default credential context to have different username in custom context.”
  1. Vladislav KostenkoApr 27, 2015
  2. Jeff KingApr 28, 2015
  3. Jeff KingApr 28, 2015

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.