如何将git remote origin git://更改为https://?

dev*_*ena 4 git github

我在git Bash中写了这个

git remote -v 
origin  git://github.com/devRena/test (fetch) 
origin  git://github.com/devRena/test (push)
Run Code Online (Sandbox Code Playgroud)

当我说

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
Run Code Online (Sandbox Code Playgroud)

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

nba*_*ari 7

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

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

git remote set-url origin https://github.com/USERNAME/REPOSITORY.git
Run Code Online (Sandbox Code Playgroud)

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

git remote set-url origin https://github.com/devRena/test.git 
Run Code Online (Sandbox Code Playgroud)


dmg*_*dmg 7

您可以简单地手动编辑 .git/config 文件。

找到以下开头的部分:

[remote "origin"]
Run Code Online (Sandbox Code Playgroud)

代替:

url = https://github.com/USERNAME/REPOSITORY.git
Run Code Online (Sandbox Code Playgroud)

url https://github.com/devRena/test.git
Run Code Online (Sandbox Code Playgroud)

节省