如何调试git远程设置url不工作
我无法将git远程url从如何调试git远程设置url不工作,git,github,Git,Github,我无法将git远程url从git://更改为https:// 如下图所示,git远程设置url不起作用: $git remote-v 起源git://github.com/userName/repoName.git (取回) 起源git://github.com/userName/repoName.git (推) $git远程设置url源https://github.com/userName/repoName.git $git remote-v 起源git://github.com/userNa
git://
更改为https://
如下图所示,git远程设置url
不起作用:
$git remote-v
起源git://github.com/userName/repoName.git (取回)
起源git://github.com/userName/repoName.git (推)
$git远程设置url源https://github.com/userName/repoName.git
$git remote-v
起源git://github.com/userName/repoName.git (取回)
起源git://github.com/userName/repoName.git (推)
我也尝试过移除遥控器并重新添加,但没有效果
.git/config
[remote "origin"]
url = https://github.com/userName/repoName.git
fetch = +refs/heads/*:refs/remotes/origin/*
我已经检查了很多关于git远程设置url
的查询,但是没有一个涉及set url
不工作的问题。解决了
通过运行$git config--list
我意识到.git/config迫使git重命名所有远程设备
要解决此问题,您可以:
git config--global--edit
git config--global--Remove节url。“git://github.com/“
见非常感谢!我花了一段时间才意识到我的原始获取设置为repo.git,而不是实际的repo名称。这是因为我有一个全局配置以某种方式保存到repo.git,它阻止我使用设置的url进行更改。
git remote add upstream https://example.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git