首页 > 解决方案 > 无法推送到 github 中的远程文件

问题描述

当我输入“push origin master”命令时出现此错误,该怎么办?

错误消息 - “致命:无法访问' https://git.com/LokeshKarki/Java-Core-Advance-Program.git/ ':SSL:没有替代证书主题名称与目标主机名 'git.com' 匹配”

是的,我尝试使用此命令 - “git config --global http.sslVerify false”然后输入“push origin master”命令,然后显示此错误消息 - “致命:无法从重定向更新 url 库:要求:https://git.com/LokeshKarki/Java-Core-Advance-Program.git/info/refs?service=git-receive-pack 重定向:https ://venture.com/domains/git.com “

我想将我的本地文件推送到我在 github 上的私人仓库。

标签: githubgithub-pages

解决方案


看起来您的远程 url 设置不正确,git.com而不是github.com. 使用以下命令更正相同:

git remote set-url origin https://github.com/LokeshKarki/Java-Core-Advance-Program.git

然后再次尝试推动。


推荐阅读