git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Unable to change remote url of origin
@ 2019-03-27 12:25 Petr Bena
  2019-03-27 12:57 ` Kevin Daudt
  2019-03-27 18:55 ` Andreas Schwab
  0 siblings, 2 replies; 6+ messages in thread
From: Petr Bena @ 2019-03-27 12:25 UTC (permalink / raw)
  To: git

Hello,

I used to change remote URL simply by editing .git/config (which may not 
be most correct way), but out of sudden I am no longer able to do that. 
So I decided to do it the "proper way" but still - to no avail. Here is 
what I do and also it's visible what is wrong:

# Display remote URL

petr.bena@MacBook:~/Documents/grumpy$ git remote -v
origin    git@github.com:grumpy-irc/grumpy (fetch)
origin    git@github.com:grumpy-irc/grumpy (push)

#Now change it to HTTPS instead of SSH

petr.bena@MacBook:~/Documents/grumpy$ git remote set-url origin 
https://github.com/grumpy-irc/grumpy

# Verify if it has changed

petr.bena@MacBook:~/Documents/grumpy$ git remote -v
origin    git@github.com:grumpy-irc/grumpy (fetch)
origin    git@github.com:grumpy-irc/grumpy (push)


It's still SSH. What am I doing wrong?

petr.bena@MacBook:~/Documents/grumpy$ git --version
git version 2.21.0


petr.bena@MacBook:~/Documents/grumpy$ cat .git/config
[core]
     repositoryformatversion = 0
     filemode = true
     bare = false
     logallrefupdates = true
     ignorecase = true
     precomposeunicode = true
[submodule]
     active = .
[remote "origin"]
     url = https://github.com/grumpy-irc/grumpy
     fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
     remote = origin
     merge = refs/heads/master
[submodule "src/libgp"]
     url = http://github.com/grumpy-irc/libgp
[submodule "src/libirc"]
     url = http://github.com/grumpy-irc/libirc
[branch "remote_scripts"]
     remote = origin
     merge = refs/heads/remote_scripts


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

* Re: Unable to change remote url of origin
  2019-03-27 12:25 Unable to change remote url of origin Petr Bena
@ 2019-03-27 12:57 ` Kevin Daudt
  2019-03-27 13:01   ` Petr Bena
  2019-03-27 18:55 ` Andreas Schwab
  1 sibling, 1 reply; 6+ messages in thread
From: Kevin Daudt @ 2019-03-27 12:57 UTC (permalink / raw)
  To: Petr Bena; +Cc: git

On Wed, Mar 27, 2019 at 01:25:27PM +0100, Petr Bena wrote:
> Hello,
> 
> I used to change remote URL simply by editing .git/config (which may not be
> most correct way), but out of sudden I am no longer able to do that. So I
> decided to do it the "proper way" but still - to no avail. Here is what I do
> and also it's visible what is wrong:
> 
> # Display remote URL
> 
> petr.bena@MacBook:~/Documents/grumpy$ git remote -v
> origin    git@github.com:grumpy-irc/grumpy (fetch)
> origin    git@github.com:grumpy-irc/grumpy (push)
> 
> #Now change it to HTTPS instead of SSH
> 
> petr.bena@MacBook:~/Documents/grumpy$ git remote set-url origin
> https://github.com/grumpy-irc/grumpy
> 
> # Verify if it has changed
> 
> petr.bena@MacBook:~/Documents/grumpy$ git remote -v
> origin    git@github.com:grumpy-irc/grumpy (fetch)
> origin    git@github.com:grumpy-irc/grumpy (push)
> 
> 
> It's still SSH. What am I doing wrong?
> 
> petr.bena@MacBook:~/Documents/grumpy$ git --version
> git version 2.21.0
> 
> 
> petr.bena@MacBook:~/Documents/grumpy$ cat .git/config
> [core]
>     repositoryformatversion = 0
>     filemode = true
>     bare = false
>     logallrefupdates = true
>     ignorecase = true
>     precomposeunicode = true
> [submodule]
>     active = .
> [remote "origin"]
>     url = https://github.com/grumpy-irc/grumpy
>     fetch = +refs/heads/*:refs/remotes/origin/*
> [branch "master"]
>     remote = origin
>     merge = refs/heads/master
> [submodule "src/libgp"]
>     url = http://github.com/grumpy-irc/libgp
> [submodule "src/libirc"]
>     url = http://github.com/grumpy-irc/libirc
> [branch "remote_scripts"]
>     remote = origin
>     merge = refs/heads/remote_scripts
> 

Hello Petr,

What does git config --show-origin remoe.origin.url return?

Kind regards, Kevin

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

* Re: Unable to change remote url of origin
  2019-03-27 12:57 ` Kevin Daudt
@ 2019-03-27 13:01   ` Petr Bena
  0 siblings, 0 replies; 6+ messages in thread
From: Petr Bena @ 2019-03-27 13:01 UTC (permalink / raw)
  To: Kevin Daudt, git

On 27/03/2019 13:57, Kevin Daudt wrote:
> On Wed, Mar 27, 2019 at 01:25:27PM +0100, Petr Bena wrote:
>> Hello,
>>
>> I used to change remote URL simply by editing .git/config (which may not be
>> most correct way), but out of sudden I am no longer able to do that. So I
>> decided to do it the "proper way" but still - to no avail. Here is what I do
>> and also it's visible what is wrong:
>>
>> # Display remote URL
>>
>> petr.bena@MacBook:~/Documents/grumpy$ git remote -v
>> origin    git@github.com:grumpy-irc/grumpy (fetch)
>> origin    git@github.com:grumpy-irc/grumpy (push)
>>
>> #Now change it to HTTPS instead of SSH
>>
>> petr.bena@MacBook:~/Documents/grumpy$ git remote set-url origin
>> https://github.com/grumpy-irc/grumpy
>>
>> # Verify if it has changed
>>
>> petr.bena@MacBook:~/Documents/grumpy$ git remote -v
>> origin    git@github.com:grumpy-irc/grumpy (fetch)
>> origin    git@github.com:grumpy-irc/grumpy (push)
>>
>>
>> It's still SSH. What am I doing wrong?
>>
>> petr.bena@MacBook:~/Documents/grumpy$ git --version
>> git version 2.21.0
>>
>>
>> petr.bena@MacBook:~/Documents/grumpy$ cat .git/config
>> [core]
>>      repositoryformatversion = 0
>>      filemode = true
>>      bare = false
>>      logallrefupdates = true
>>      ignorecase = true
>>      precomposeunicode = true
>> [submodule]
>>      active = .
>> [remote "origin"]
>>      url = https://github.com/grumpy-irc/grumpy
>>      fetch = +refs/heads/*:refs/remotes/origin/*
>> [branch "master"]
>>      remote = origin
>>      merge = refs/heads/master
>> [submodule "src/libgp"]
>>      url = http://github.com/grumpy-irc/libgp
>> [submodule "src/libirc"]
>>      url = http://github.com/grumpy-irc/libirc
>> [branch "remote_scripts"]
>>      remote = origin
>>      merge = refs/heads/remote_scripts
>>
> Hello Petr,
>
> What does git config --show-origin remoe.origin.url return?
>
> Kind regards, Kevin


Hello Kevin,

petr.bena@MacBook:~/Documents/grumpy$ git config --show-origin 
remote.origin.url
file:.git/config    https://github.com/grumpy-irc/grumpy

However git push is still accessing SSH version (which is blocked by FW 
in this place):

petr.bena@MacBook:~/Documents/grumpy$ git push -v
Pushing to git@github.com:grumpy-irc/grumpy

I need to change it to HTTPS


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

* Re: Unable to change remote url of origin
  2019-03-27 12:25 Unable to change remote url of origin Petr Bena
  2019-03-27 12:57 ` Kevin Daudt
@ 2019-03-27 18:55 ` Andreas Schwab
  2019-03-28  9:05   ` Petr Bena
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2019-03-27 18:55 UTC (permalink / raw)
  To: Petr Bena; +Cc: git

On Mär 27 2019, Petr Bena <petr@bena.rocks> wrote:

> # Display remote URL
>
> petr.bena@MacBook:~/Documents/grumpy$ git remote -v
> origin    git@github.com:grumpy-irc/grumpy (fetch)
> origin    git@github.com:grumpy-irc/grumpy (push)
>
> #Now change it to HTTPS instead of SSH
>
> petr.bena@MacBook:~/Documents/grumpy$ git remote set-url origin
> https://github.com/grumpy-irc/grumpy
>
> # Verify if it has changed
>
> petr.bena@MacBook:~/Documents/grumpy$ git remote -v
> origin    git@github.com:grumpy-irc/grumpy (fetch)
> origin    git@github.com:grumpy-irc/grumpy (push)
>
>
> It's still SSH. What am I doing wrong?

Do you have a URL rewrite rule (url.*.insteadof)?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

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

* Re: Unable to change remote url of origin
  2019-03-27 18:55 ` Andreas Schwab
@ 2019-03-28  9:05   ` Petr Bena
  2019-03-28 11:57     ` Petr Bena
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Bena @ 2019-03-28  9:05 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: git

On 27/03/2019 19:55, Andreas Schwab wrote:
> Do you have a URL rewrite rule (url.*.insteadof)?
>
> Andreas.
>
I don't know. How do I figure that out? There is nothing like this in my 
~/.ssh/config

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

* Re: Unable to change remote url of origin
  2019-03-28  9:05   ` Petr Bena
@ 2019-03-28 11:57     ` Petr Bena
  0 siblings, 0 replies; 6+ messages in thread
From: Petr Bena @ 2019-03-28 11:57 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: git

On 28/03/2019 10:05, Petr Bena wrote:
> On 27/03/2019 19:55, Andreas Schwab wrote:
>> Do you have a URL rewrite rule (url.*.insteadof)?
>>
>> Andreas.
>>
> I don't know. How do I figure that out? There is nothing like this in 
> my ~/.ssh/config
Oh you were right I found it in git config --list, removing this from 
.gitconfig fixed the problem, no idea how did it get in there

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

end of thread, other threads:[~2019-03-28 11:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-27 12:25 Unable to change remote url of origin Petr Bena
2019-03-27 12:57 ` Kevin Daudt
2019-03-27 13:01   ` Petr Bena
2019-03-27 18:55 ` Andreas Schwab
2019-03-28  9:05   ` Petr Bena
2019-03-28 11:57     ` Petr Bena

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).