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

Re: URL rewrite in local config unable to override global config rule

From
Jeff King <peff@peff.net>
Date
Jun 16, 2016, 12:13 UTC
Message-ID
<20160616121353.GB15988@sigill.intra.peff.net>
In-Reply-To
<CABYP2JZU5wqxCK1B7b_fDB0Lqz4-7a_Erb5dHKReZHQecxC8QQ@mail.gmail.com>
On Thu, Jun 16, 2016 at 03:44:17PM +0530, Saksham Saxena wrote:
> Summary : Added a new rule to the local config of a git repo by
> issuing ' git config --local url."https://".insteadOf git:// ', but it
> wasn't observed by git as it kept using "git://".
Hmm. This works in a simple example for me...
> Details : I had set my global config to use "git://" instead of
> "https://", as I prefer working with SSH.

..even if I have an existing "url.git://.insteadOf=https://". But I could believe that having other config confuses things. The url-rewriting is not "last one wins", but rather that we try all of them, and the longest match wins.

Can you show us the output of "git config --list" on a repository that is having this problem, and then the command that you run and its output?

Show 5 quoted lines
> Recently, I began writing a
> 'GitHub Wiki' of one of my GitHub projects, and, apparently, those
> Wikis are normal git repositories, and can be cloned and edited
> locally. However, the clone url available is served over HTTPS only,
> and doesn't support any other protocol.

You should be able to clone, fetch, or push wiki repositories using any of the normal protocols. So:

  git@github.com:username/repo.wiki.git

should work. Likewise, git:// will work if the repository is public, but you cannot push over it.

-Peff
Previous: Saksham SaxenaNext: Saksham Saxena
Message 2 of 6 in “URL rewrite in local config unable to override global config rule”
  1. Saksham SaxenaJun 16, 2016
  2. Jeff KingJun 16, 2016
  3. Saksham SaxenaJun 17, 2016
  4. Jeff KingJun 17, 2016
  5. Saksham SaxenaJun 18, 2016
  6. Jeff KingJun 18, 2016

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.