Search code examples
linuxgitgithubgit-remote

'git remote' displays different url than set in .git/config


Yesterday started having weird issues with my github repos, when was suddenly prompted for user & passwd for push. Git is set up using ssh, and no changes have been made in months.

$ git remote -v
origin  https://github.com/user/repo.git (fetch)
origin  https://github.com/user/repo.git (push)

$ cat .git/config
 /-/
[remote "origin"]
    url = git@github.com:user/repo.git
/-/

$ git config remote.origin.url
git@github.com:user/repo.git

Re-setting via remote set-url doesn't change anything either. No issues with bitbucket repos. Has there been some change I've missed?


Solution

  • My gitconfig includes a config from one of the projects I'm currently working on. A new property was introduced I wasn't aware of:

    [url "https://github.com/"]
        insteadOf = "git://github.com/"
    

    Case closed.