'git remote' 显示与 .git/config 中设置不同的 url

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

昨天我的 github 存储库开始出现奇怪的问题,当时突然提示输入用户名和密码进行推送。 Git是用ssh设置的,几个月没改过。

$ 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

通过远程 set-url 重新设置也没有任何改变。 bitbucket 回购没有问题。我错过了一些变化吗?

我的 gitconfig 包含来自我当前正在处理的项目之一的配置。引入了一个我不知道的新 属性:

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

案件结案。