关于github:如何将git远程源git://更改为https://?

How to change git remote origin git:// to https://?

本问题已经有最佳答案,请猛点这里访问。

我用Git Bash写的这个

1
2
3
git remote -v
origin  git://github.com/devRena/test (fetch)
origin  git://github.com/devRena/test (push)

当我说

1
2
3
4
git push origin master
fatal remote error:
You can't push to git://github.com/devRena/test.git  
Use https://github.com/devRena/test.git

如何将git://github.com/devrena/test.git更改为https://github.com/devrena/test.git??


检查从GitHub更改遥控器的URL文档:

使用git remote set-url命令更改遥控器的URL:

1
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git

在您的情况下,请尝试以下操作:

1
git remote set-url origin https://github.com/devRena/test.git

您可以手工编辑.git/config文件。

查找以以下内容开头的部分:

1
[remote"origin"]

替换:

1
url = https://github.com/USERNAME/REPOSITORY.git

具有

1
url https://github.com/devRena/test.git

节约