Git:git clone报错The project you were looking for could not be found or you don‘t have ...

一、git clone 项目,报错如下

remote: The project you were looking for could not be found or you don't have permission to view it.
fatal: repository 'http://xxx.xxx.com/xxx_tools/xxx-frontend.git/' not found

解决问题

在http://后增加 “用户名@”

git clone http://[email protected]/xxx_tools/xxx-frontend.git

经过测试,问题解决了

二、AI解释

git clone命令中,你可以在仓库地址中指定用户名。这种方式被用于在克隆私有仓库时进行身份验证。

具体来说,你可以将 用户名 替换为你的用户名,将 仓库地址 替换为你要克隆的仓库的URL。在克隆时,Git会使用你提供的用户名来进行身份验证,以确保你有权限访问该仓库。

请注意,这种方式可能不适用于所有的Git仓库,因为不是所有仓库都要求进行身份验证。如果你没有特定的要求,那么你可以直接使用不带用户名的URL进行克隆。

示例:

git clone http://[email protected]/your/repository.git

yourusername 替换为你的真实用户名,将 github.com/your/repository.git 替换为你要克隆的仓库的URL。

三、欢迎交流指正

参考链接

Git:Git分支管理规范 / 常用命令-CSDN博客

猜你喜欢

转载自blog.csdn.net/snowball_li/article/details/135205115