学习廖雪峰git教程-git报错ERROR: Repository not found
问题描述:学习廖雪峰git教程-本地库内容推送到远程库出错:运行git push -u origin master指令出错,报错如下:ERROR: Repository not found.fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the r
·
问题描述:
学习廖雪峰git教程-本地库内容推送到远程库出错:
运行git push -u origin master指令出错,报错如下:
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解决方案:
执行git remote -v命令,发现我的remote地址用的是git开头的地址,如下:
于是,我执行指令:git remote set-url origin https://github.com/CHANGEA-code/learngit.git 将地址改为https类型地址,如下:
指令格式:git remote set-url $1 $2
其中$1是remote name,一般是origin或upstream;
$2是new remote url,如https://github.com/CHANGEA-code/learngit.git
查看是否成功:
再运行git push -u origin master,如下:(注意:这里可能会弹出窗口询问是否授权,操作授权即可)
成功将本地库内容推送到远程库:
更多推荐
已为社区贡献1条内容
所有评论(0)