ZBLOG

$ git push origin HEAD:refs/for/develop fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.怎么处理

这个错误通常是由于本地仓库没有正确配置远程仓库的原因所致。可以使用以下命令查看当前仓库的远程仓库列表:

git remote -v

如果没有任何输出,说明当前仓库没有与远程仓库关联。需要使用如下命令添加远程仓库:

git remote add <remote_name> <remote_url>

其中,<remote_name> 是你为远程仓库起的名称,<remote_url> 是远程仓库的 URL。

例如,假设你要将远程仓库的名称设置为 origin,URL 为 https://github.com/username/repo.git,可以使用以下命令添加远程仓库:

git remote add origin https://github.com/username/repo.git

添加成功后,再执行 git push 命令即可将本地分支推送到远程仓库。

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:https://golang.0voice.com/?id=1005

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?