linux - “git remote”显示的 url 与 .git/config 中设置的不同

标签 linux git github git-remote

昨天我的 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 repo 没有问题。我错过了一些变化吗?

最佳答案

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

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

结案。

关于linux - “git remote”显示的 url 与 .git/config 中设置的不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36446832/

相关文章:

linux - 为什么运行时 undefined symbol 会通过将/usr/lib 添加到ld.so.conf 来修复?

python - Raspberry Pi NoIR 相机挂起

git - 如何删除 git 存储库而不删除其中的文件

Gitcherry-pick 创建 blob 而不提交?

node.js - Node npm install,强制依赖的依赖安装特定版本

linux - 管理目录的系统调用

linux - gcc 本地在主文件夹中本地安装 gcc 7.1

git - git-describe 中的提交计数计算

git - 如何将 UML 图集成到 GitLab 或 GitHub

github - 在 Github Action 中,如何根据上一步的输出条件化步骤?