git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* URL rewrite in local config unable to override global config rule
@ 2016-06-16 10:14 Saksham Saxena
  2016-06-16 12:13 ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: Saksham Saxena @ 2016-06-16 10:14 UTC (permalink / raw)
  To: git

Hello everyone

I came across an anomaly in git recently, and would like to share it
here. Please suggest if this is a bug, or if my approach is wrong.

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://".

Details : I had set my global config to use "git://" instead of
"https://", as I prefer working with SSH. 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. Naturally, I had to change my
config to change the behavior of git while connecting to the remote. I
thus proceeded to update the local config of the repo to use
"https://" instead of "git://". However, my remote urls weren't
updated. I manually then removed these remote urls and added new HTTPS
ones. Yet, the remote urls showed "git://" protocol in them.
Screenshot of the terminal window can be found here
(http://i.stack.imgur.com/y7GMP.png).

I tried to add the "pushInsteadOf" rule as well, but again, it didn't
take effect. This is particularly disappointing, because the local
config have the highest priority, and yet it isn't effective at all.
Because of the limitation of my remote, I cannot even push my changes.
True, that I can dig up some dirty workarounds, but I do not
understand why this behavior is seen.

I have also asked this on the popular Stack Overflow forum
(http://stackoverflow.com/questions/37844460/git-remote-url-is-not-updating).
If any of the moderators here do not find this issue as a bug, then
they may help me out on the forum itself (if you happen to be on it)
to reduce the noise on this thread.

I hope I described my problem clearly. Awaiting response.

Regards
Saksham Saxena

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-06-18 13:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-16 10:14 URL rewrite in local config unable to override global config rule Saksham Saxena
2016-06-16 12:13 ` Jeff King
2016-06-17 14:35   ` Saksham Saxena
2016-06-17 15:01     ` Jeff King
2016-06-18  5:36       ` Saksham Saxena
2016-06-18 13:49         ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).