美文网首页
git clone 提示:remote not found fa

git clone 提示:remote not found fa

作者: NMSLM | 来源:发表于2020-02-11 14:19 被阅读0次

操作git的时候报错如下:

fatal: repository 'https://xxx@bitbucket.org/xxx.git/' not found

致命伤害?:没找到'xxx.git'。

根本原因就是,repository地址被更改了;

举个例子,现在要更改repository名称:

由原来的“https://xxx/old_directory.git”改为现在的 “https://username:password@xxx/xxx/new_directory.git

所以此时你本地执行git命令操作线上的仓库是没用的,通道都错了怎么走下去;所以我们必须修改本地git仓库指向的远程仓库地址

解决方案如下:

输入下面这行命令设置远程url为修改后的地址;

git remote set-url origin https://username:password@xxx/xxx/new_directory.git

改了之后可以查看remote链接,命令如下

git remote -v 

当然,发现这个错误的时候也可以用这个命令(git remote -v)确认一下,链接是否正确;不正确就执行替换remote的命令

相关文章

网友评论

      本文标题:git clone 提示:remote not found fa

      本文链接:https://www.haomeiwen.com/subject/kclxfhtx.html