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



昨天我的github repos开始出现奇怪的问题,突然被提示输入user&推送的密码。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

通过远程设置url重新设置也不会改变任何内容。比特桶回购没有问题。我错过了什么零钱吗?

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

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

案件结案。

最新更新