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
SSSaksham Saxena <saksham.saxena.1994@ieee.org>
Date
Jun 17, 2016, 14:35 UTC
Message-ID
<CABYP2JZ5nNHh_cRkgpRMkn7Qfs4zAjy+wfaputJ0CvZ-M4FW6w@mail.gmail.com>
In-Reply-To
<20160616121353.GB15988@sigill.intra.peff.net>
On Thu, Jun 16, 2016 at 5:43 PM, Jeff King <peff@peff.net> wrote:
Show 16 quoted lines
> 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.
Longest? Could you elaborate please?
Show 5 quoted lines
>
> 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?

Here you go (https://gist.github.com/sakshamsaxena/a1cee9c39ddc127ae659e92d02d58f0b). The commands are run in that sequence.

Show 15 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.
True. Can't push over git:// and that's why I'm limited to https://
>
> -Peff
-- 
Regards
Saksham Saxena
Member, IEEE Delhi Section Student Network
Member, IEEE DTU Student Branch
Student, Delhi Technological University
Previous: Jeff KingNext: Jeff King
Message 3 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.