git - 如何更改 git 远程源 git ://to https://?

标签 git github

<分区>

我在 git Bash 中写了这个

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

当我说

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 ??

最佳答案

检查 Changing a remote's URL来自 GitHub 的文档:

使用 git remote set-url 命令更改 Remote 的 URL:

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

在你的情况下,试试这个:

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

关于git - 如何更改 git 远程源 git ://to https://?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50020142/

相关文章:

用于搜索提交消息的 Git 别名

git:在不改变所有权/blame 的情况下改变样式(空白)?

github - 为什么我的 GitHub 页面不更新其内容?

templates - GitHub - 用于复制设置和标签的模板存储库

项目贡献者的 github graphql 查询

git - 修改不在分支顶端的提交的最快、最简单的方法?

git - 为什么我的 instance/settings.py 文件不能 git Push?

python - 扩建/先生。开发人员随机无法从 Git pull

git - 使用 git 子模块时的 NuGet 自动包还原

git - 列出除一个以外的所有远程分支的提交