URL rewrite in local config unable to override global config rule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]