首页 > 解决方案 > 设置远程 url 不更改为 https

问题描述

我正在尝试将我的远程 URL 从更改git@github.com:BuddyBob/Py_Programs.git**https://**github.com/user/repo2.git.

所以我做到了

git remote set-url origin https://github.com/BuddyBob/Py_Programs.git

git remote -v   

但似乎没有任何改变

origin  git@github.com:BuddyBob/Py_Programs.git (fetch)
origin  git@github.com:BuddyBob/Py_Programs.git (push)

我究竟做错了什么?

标签: gitgit-remote

解决方案


够搞笑的。我做了一些深入研究我的 github 配置。

我意识到在我拥有的文件中的某个地方。这可能是我的问题的原因。

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

所以我把它们换了。你知道什么!

我只是跑

git remote set-url origin https://github.com/BuddyBob/Py_Programs.git

git remote -v   

我明白了

origin  https://github.com/BuddyBob/Py_Programs.git (fetch)
origin  https://github.com/BuddyBob/Py_Programs.git (push)

推荐阅读